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
|
|
|
|
2008-11-19 13:26:10 +01:00
|
|
|
#define WILLRECEIVE(target, source_ep) \
|
2009-11-10 10:11:13 +01:00
|
|
|
((RTS_ISSET(target, RTS_RECEIVING) && !RTS_ISSET(target, RTS_SENDING)) && \
|
2008-11-19 13:26:10 +01:00
|
|
|
(target->p_getfrom_e == ANY || target->p_getfrom_e == source_ep))
|
|
|
|
|
2010-03-23 01:09:11 +01:00
|
|
|
/* IPC status code macros. */
|
|
|
|
#define IPC_STATUS_REG bx
|
|
|
|
#define IPC_STATUS_GET(p) ((p)->p_reg.IPC_STATUS_REG)
|
|
|
|
#define IPC_STATUS_SET(p, m) ((p)->p_reg.IPC_STATUS_REG = m)
|
|
|
|
#define IPC_STATUS_CLEAR(p) IPC_STATUS_SET(p, 0)
|
|
|
|
#define IPC_STATUS_ADD(p, m) ((p)->p_reg.IPC_STATUS_REG |= m)
|
2008-11-19 13:26:10 +01:00
|
|
|
|
2005-07-14 17:12:12 +02:00
|
|
|
#endif /* IPC_H */
|