ipc.h

Go to the documentation of this file.
00001 #ifndef _LINUX_IPC_H
00002 #define _LINUX_IPC_H
00003 #include <linux/types.h>
00004 
00005 typedef int key_t;              ///< should go in <types.h> type for IPC key 
00006 #define IPC_PRIVATE ((key_t) 0)  
00007 
00008 struct ipc_perm
00009 {
00010   key_t  key;
00011   ushort uid;   ///< owner euid and egid 
00012   ushort gid;
00013   ushort cuid;  ///< creator euid and egid 
00014   ushort cgid;
00015   ushort mode;  ///< access modes see mode flags below 
00016   ushort seq;   ///< sequence number 
00017 };
00018 
00019 
00020 /// resource get request flags 
00021 #define IPC_CREAT  00001000   ///< create if key is nonexistent 
00022 #define IPC_EXCL   00002000   ///< fail if key exists 
00023 #define IPC_NOWAIT 00004000   ///< return error on wait 
00024 
00025 
00026 /**
00027 *
00028  
00029  * Control commands used with semctl, msgctl and shmctl 
00030  * see also specific commands in sem.h, msg.h and shm.h
00031 
00032 
00033 */
00034 #define IPC_RMID 0     ///< remove resource 
00035 #define IPC_SET  1     ///< set ipc_perm options 
00036 #define IPC_STAT 2     ///< get ipc_perm options 
00037 #define IPC_INFO 3     ///< see ipcs 
00038 
00039 #ifdef __KERNEL__
00040 
00041 /// special shmsegs[id], msgque[id] or semary[id]  values 
00042 #define IPC_UNUSED      ((void *) -1)
00043 #define IPC_NOID        ((void *) -2)           ///< being allocated/destroyed 
00044 
00045 /**
00046 *
00047  
00048  * These are used to wrap system calls. See ipc/util.c, libipc.c 
00049 
00050 
00051 */
00052 struct ipc_kludge {
00053     struct msgbuf *msgp;
00054     long msgtyp;
00055 };
00056 
00057 #define SEMOP           1
00058 #define SEMGET          2
00059 #define SEMCTL          3
00060 #define MSGSND          11
00061 #define MSGRCV          12
00062 #define MSGGET          13
00063 #define MSGCTL          14
00064 #define SHMAT           21
00065 #define SHMDT           22
00066 #define SHMGET          23
00067 #define SHMCTL          24
00068 
00069 #endif // __KERNEL__ 
00070 
00071 #endif // _LINUX_IPC_H 
00072 
00073 

Generated on Mon May 1 21:47:00 2006 for KernelAPI by  doxygen 1.4.6-5