2005-07-14 17:12:12 +02:00
|
|
|
#ifndef IPC_H
|
|
|
|
#define IPC_H
|
|
|
|
|
2005-08-04 11:26:36 +02:00
|
|
|
/* This header file defines constants for MINIX inter-process communication.
|
|
|
|
* These definitions are used in the file proc.c.
|
|
|
|
*/
|
2005-07-26 14:48:34 +02:00
|
|
|
#include <minix/com.h>
|
|
|
|
|
2005-05-27 15:57:00 +02:00
|
|
|
/* Masks and flags for system calls. */
|
|
|
|
#define SYSCALL_FUNC 0x0F /* mask for system call function */
|
|
|
|
#define SYSCALL_FLAGS 0xF0 /* mask for system call flags */
|
|
|
|
#define NON_BLOCKING 0x10 /* prevent blocking, return error */
|
|
|
|
|
2005-07-26 14:48:34 +02:00
|
|
|
/* System call numbers that are passed when trapping to the kernel. The
|
|
|
|
* numbers are carefully defined so that it can easily be seen (based on
|
|
|
|
* the bits that are on) which checks should be done in sys_call().
|
|
|
|
*/
|
2005-09-11 18:44:06 +02:00
|
|
|
#define SEND 1 /* 0 0 0 1 : blocking send */
|
|
|
|
#define RECEIVE 2 /* 0 0 1 0 : blocking receive */
|
|
|
|
#define SENDREC 3 /* 0 0 1 1 : SEND + RECEIVE */
|
|
|
|
#define NOTIFY 4 /* 0 1 0 0 : nonblocking notify */
|
|
|
|
#define ECHO 8 /* 1 0 0 0 : echo a message */
|
2005-07-26 14:48:34 +02:00
|
|
|
|
2005-07-26 15:51:21 +02:00
|
|
|
/* The following bit masks determine what checks that should be done. */
|
2005-09-11 18:44:06 +02:00
|
|
|
#define CHECK_PTR 0x0B /* 1 0 1 1 : validate message buffer */
|
|
|
|
#define CHECK_DST 0x05 /* 0 1 0 1 : validate message destination */
|
|
|
|
#define CHECK_SRC 0x02 /* 0 0 1 0 : validate message source */
|
2005-10-12 17:08:23 +02:00
|
|
|
#define CHECK_DEADLOCK 0x03 /* 0 0 1 1 : check for deadlock */
|
2005-05-27 15:57:00 +02:00
|
|
|
|
2005-07-14 17:12:12 +02:00
|
|
|
#endif /* IPC_H */
|