aboutsummaryrefslogtreecommitdiffstats
path: root/toj/center/src/judge.h
diff options
context:
space:
mode:
Diffstat (limited to 'toj/center/src/judge.h')
-rw-r--r--toj/center/src/judge.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/toj/center/src/judge.h b/toj/center/src/judge.h
new file mode 100644
index 0000000..5183942
--- /dev/null
+++ b/toj/center/src/judge.h
@@ -0,0 +1,44 @@
+#ifndef JUDGE_H
+#define JUDGE_H
+
+#define JUDGE_THREAD_MAX 16
+#define JUDGE_THREAD_JUDGEMAX 2
+
+#define JUDGE_CACHESTATE_READY 0
+#define JUDGE_CACHESTATE_UPDATE 1
+
+class judge_pro_info{
+public:
+ int proid;
+ int cacheid;
+ int ref_count;
+
+ int state;
+ int update_cacheid;
+
+ judge_pro_info(int proid,int cacheid){
+ this->proid = proid;
+ this->cacheid = cacheid;
+ this->ref_count = 0;
+
+ this->state = JUDGE_CACHESTATE_READY;
+ this->update_cacheid = 0;
+ }
+};
+
+class judge_submit_info{
+public:
+ int subid;
+ judge_pro_info *pro_info;
+ int lang;
+ char *set_data;
+
+ judge_submit_info(int subid,judge_pro_info *pro_info,int lang,char *set_data){
+ this->subid = subid;
+ this->pro_info = pro_info;
+ this->lang = lang;
+ this->set_data = set_data;
+ }
+};
+
+#endif