aboutsummaryrefslogtreecommitdiffstats
path: root/judge/line_vscore.h
blob: 3609e8870a7664e3488beaaa05aedcc9a2544f92 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#define CHECK_THREAD_WAITTIME 5

typedef int (*check_init_fn)(char *runpath,char *datapath);
typedef void* (*check_thread_fn)(void *arg);
typedef int (*check_stop_fn)(void);

struct line_setting_info{
    unsigned long timelimit;
    unsigned long hardtimelimit;
    unsigned long memlimit;
    int count;
};
struct line_procrun_info{
    struct judgx_proc_info *proc_info;
    judgx_check_run_fn check_run;
    sem_t *done_sem;
};
struct check_thread_info{
    int status;
    int score;
    int maxscore;
    sem_t *done_sem;
};

static void line_ini_handler(void *data,char *section,char *key,char *value);
static void* line_procrun_thread(void *arg);

DLL_PUBLIC int run(struct judgx_line_info *line_info);