|
|
1.1 root 1: /* @(#)msgsys.c 1.1 */
2: #include <sys/types.h>
3: #include <sys/mbuf.h>
4: #include <sys/time.h>
5: #include <sys/ipc.h>
6: #include <sys/msg.h>
7:
8: #define MSGSYS 152
9:
10: #define MSGGET 0
11: #define MSGCTL 1
12: #define MSGRCV 2
13: #define MSGSND 3
14:
15: msgget(key, msgflg)
16: key_t key;
17: int msgflg;
18: {
19: return(syscall(MSGSYS, MSGGET, key, msgflg));
20: }
21:
22: msgctl(msqid, cmd, buf)
23: int msqid, cmd;
24: struct msqid_ds *buf;
25: {
26: return(syscall(MSGSYS, MSGCTL, msqid, cmd, buf));
27: }
28:
29: msgrcv(msqid, msgp, msgsz, msgtyp, msgflg)
30: int msqid;
31: struct msgbuf *msgp;
32: int msgsz;
33: long msgtyp;
34: int msgflg;
35: {
36: return(syscall(MSGSYS, MSGRCV, msqid, msgp, msgsz, msgtyp, msgflg));
37: }
38:
39: msgsnd(msqid, msgp, msgsz, msgflg)
40: int msqid;
41: struct msgbuf *msgp;
42: int msgsz, msgflg;
43: {
44: return(syscall(MSGSYS, MSGSND, msqid, msgp, msgsz, msgflg));
45: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.