minix/kernel/ipc.h

24 lines
789 B
C
Raw Normal View History

#ifndef IPC_H
#define IPC_H
/* This header file defines constants for MINIX inter-process communication.
* These definitions are used in the file proc.c.
*/
#include <minix/com.h>
/* 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 */
#define WILLRECEIVE(target, source_ep) \
((RTS_ISSET(target, RTS_RECEIVING) && !RTS_ISSET(target, RTS_SENDING)) && \
(target->p_getfrom_e == ANY || target->p_getfrom_e == source_ep))
/* 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)
#endif /* IPC_H */