From 56688ed6d0b18f68ac8ddd82c4944c5d2777d20a Mon Sep 17 00:00:00 2001 From: pzread Date: Fri, 1 Mar 2013 22:30:00 +0800 Subject: Taiwan Online Judge Alpha 1 --- toj/center/src/judgk_com.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 toj/center/src/judgk_com.h (limited to 'toj/center/src/judgk_com.h') diff --git a/toj/center/src/judgk_com.h b/toj/center/src/judgk_com.h new file mode 100644 index 0000000..842c69c --- /dev/null +++ b/toj/center/src/judgk_com.h @@ -0,0 +1,25 @@ +#define IOCTL_PROC_ADD _IOWR('x',0x0,int) +#define IOCTL_PROC_GET _IOWR('x',0x1,int) +#define IOCTL_PROC_DEL _IOR('x',0x3,int) + +#define IOCTL_HYPERIO_ADD _IOWR('x',0x10,int) +#define IOCTL_HYPERIO_READ _IOWR('x',0x11,int) +#define IOCTL_HYPERIO_WRITE _IOWR('x',0x12,int) +#define IOCTL_HYPERIO_DEL _IOWR('x',0x13,int) + +#define JUDGK_COM_HYPERIO_BUFSIZE 4194304 + +struct judgk_com_proc_add{ + char run_path[PATH_MAX + 1]; + pid_t pid; + unsigned long kern_task; + unsigned long timelimit; + unsigned long hardtimelimit; + unsigned long memlimit; +}; +struct judgk_com_proc_get{ + unsigned long kern_task; + int status; + unsigned long runtime; + unsigned long memory; +}; -- cgit v1.2.3