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. */
|
2007-04-23 15:44:56 +02:00
|
|
|
#define NON_BLOCKING 0x0080 /* do not block if target not ready */
|
2005-05-27 15:57:00 +02:00
|
|
|
|
2007-04-23 15:44:56 +02:00
|
|
|
/* System call numbers that are passed when trapping to the kernel. */
|
|
|
|
#define SEND 1 /* blocking send */
|
|
|
|
#define RECEIVE 2 /* blocking receive */
|
|
|
|
#define SENDREC 3 /* SEND + RECEIVE */
|
|
|
|
#define NOTIFY 4 /* asynchronous notify */
|
2008-11-19 13:26:10 +01:00
|
|
|
#define SENDNB 5 /* nonblocking send */
|
2007-04-23 15:44:56 +02:00
|
|
|
#define SENDA 16 /* asynchronous send */
|
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. */
|
2007-04-23 15:44:56 +02:00
|
|
|
#define CHECK_DEADLOCK 0x03 /* 0000 0011 : check for deadlock */
|
2005-05-27 15:57:00 +02:00
|
|
|
|
2008-11-19 13:26:10 +01:00
|
|
|
#define WILLRECEIVE(target, source_ep) \
|
|
|
|
((RTS_ISSET(target, RECEIVING) && !RTS_ISSET(target, SENDING)) && \
|
|
|
|
(target->p_getfrom_e == ANY || target->p_getfrom_e == source_ep))
|
|
|
|
|
|
|
|
|
2005-07-14 17:12:12 +02:00
|
|
|
#endif /* IPC_H */
|