-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrequest.h
33 lines (27 loc) · 844 Bytes
/
request.h
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
29
30
31
32
33
#ifndef REQUEST_H_
#define REQUEST_H_
#include <unistd.h>
#include <sys/types.h>
/* request ids */
enum request_enum {
REQ_PRINT_TASKS, /* print tasks */
REQ_KILL_TASK, /* kill ->task_arg task */
REQ_EXEC_TASK, /* execute ->exec_task_arg with priority ->prio_arg */
REQ_HIGH_TASK, /* set ->task_arg to be of high priority */
REQ_LOW_TASK, /* set ->task_arg to be of low priority */
REQ_KILL_SHELL /* kills shell */
};
#define EXEC_TASK_NAME_SZ 60
/* Structure describing system call. */
struct request_struct {
/* System call number */
enum request_enum request_no;
/*
* System call arguments.
* Can you think of a better organization for these fields?
* Contact the lab assistants before any changes to the structure.
*/
int task_arg;
char exec_task_arg[EXEC_TASK_NAME_SZ];
};
#endif /* REQUEST_H_ */