1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| #include<sys/types.h> #include<sys/ipc.h> #include<sys.msg.h> int msgget(key_t key,int msgflg); int msgsnd(int msqid,struct msgbuf *msgp,size_t msgsz,int msgflg); ssize_t msgrcv(int msqid,struct msgbuf *msgp,size_t msgsz,long msgtyp,int msgflg); int msgctl(int msqid,int cmd,struct msqid_ds *buf);
struct msgbuf{ long mtype; char mtext[1]; };
|