Line | |
---|
1 | #ifndef IPC_H
|
---|
2 | #define IPC_H
|
---|
3 |
|
---|
4 | /* This header file defines constants for MINIX inter-process communication.
|
---|
5 | * These definitions are used in the file proc.c.
|
---|
6 | */
|
---|
7 | #include <minix/com.h>
|
---|
8 |
|
---|
9 | /* Masks and flags for system calls. */
|
---|
10 | #define SYSCALL_FUNC 0x000F /* mask for system call function */
|
---|
11 | #define SYSCALL_FLAGS 0x00F0 /* mask for system call flags */
|
---|
12 | #define NON_BLOCKING 0x0010 /* do not block if target not ready */
|
---|
13 |
|
---|
14 | /* System call numbers that are passed when trapping to the kernel. The
|
---|
15 | * numbers are carefully defined so that it can easily be seen (based on
|
---|
16 | * the bits that are on) which checks should be done in sys_call().
|
---|
17 | */
|
---|
18 | #define SEND 1 /* 0001 : blocking send */
|
---|
19 | #define RECEIVE 2 /* 0010 : blocking receive */
|
---|
20 | #define SENDREC 3 /* 0011 : SEND + RECEIVE */
|
---|
21 | #define NOTIFY 4 /* 0100 : nonblocking notify */
|
---|
22 | #define ECHO 8 /* 1000 : echo a message */
|
---|
23 |
|
---|
24 | #define IPC_REQUEST 5 /* 0101 : blocking request */
|
---|
25 | #define IPC_REPLY 6 /* 0110 : nonblocking reply */
|
---|
26 | #define IPC_NOTIFY 7 /* 0111 : nonblocking notification */
|
---|
27 | #define IPC_RECEIVE 9 /* 1001 : blocking receive */
|
---|
28 |
|
---|
29 | /* The following bit masks determine what checks that should be done. */
|
---|
30 | #define CHECK_PTR 0xBB /* 1011 1011 : validate message buffer */
|
---|
31 | #define CHECK_DST 0x55 /* 0101 0101 : validate message destination */
|
---|
32 | #define CHECK_DEADLOCK 0x93 /* 1001 0011 : check for deadlock */
|
---|
33 |
|
---|
34 | #endif /* IPC_H */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.