Deleted Added
full compact
sysv_msg.c (10428) sysv_msg.c (10653)
1/* $Id: sysv_msg.c,v 1.6 1995/08/28 09:18:46 julian Exp $ */
1/* $Id: sysv_msg.c,v 1.7 1995/08/30 00:33:00 bde Exp $ */
2
3/*
4 * Implementation of SVID messages
5 *
6 * Author: Daniel Boulet
7 *
8 * Copyright 1993 Daniel Boulet and RTMX Inc.
9 *

--- 11 unchanged lines hidden (view full) ---

21
22#include <sys/param.h>
23#include <sys/systm.h>
24#include <sys/kernel.h>
25#include <sys/proc.h>
26#include <sys/msg.h>
27#include <sys/malloc.h>
28
2
3/*
4 * Implementation of SVID messages
5 *
6 * Author: Daniel Boulet
7 *
8 * Copyright 1993 Daniel Boulet and RTMX Inc.
9 *

--- 11 unchanged lines hidden (view full) ---

21
22#include <sys/param.h>
23#include <sys/systm.h>
24#include <sys/kernel.h>
25#include <sys/proc.h>
26#include <sys/msg.h>
27#include <sys/malloc.h>
28
29static void msginit __P((caddr_t));
29static void msginit __P((void *));
30SYSINIT(sysv_msg, SI_SUB_SYSV_MSG, SI_ORDER_FIRST, msginit, NULL)
31
32#define MSG_DEBUG
33#undef MSG_DEBUG_OK
34
35static int msgctl(), msgget(), msgsnd(), msgrcv();
36
37int (*msgcalls[])() = { msgctl, msgget, msgsnd, msgrcv };
38
39int nfree_msgmaps; /* # of free map entries */
40short free_msgmaps; /* head of linked list of free map entries */
41struct msg *free_msghdrs; /* list of free msg headers */
42char *msgpool; /* MSGMAX byte long msg buffer pool */
43struct msgmap *msgmaps; /* MSGSEG msgmap structures */
44struct msg *msghdrs; /* MSGTQL msg headers */
45struct msqid_ds *msqids; /* MSGMNI msqid_ds struct's */
46
47void
48msginit(udata)
30SYSINIT(sysv_msg, SI_SUB_SYSV_MSG, SI_ORDER_FIRST, msginit, NULL)
31
32#define MSG_DEBUG
33#undef MSG_DEBUG_OK
34
35static int msgctl(), msgget(), msgsnd(), msgrcv();
36
37int (*msgcalls[])() = { msgctl, msgget, msgsnd, msgrcv };
38
39int nfree_msgmaps; /* # of free map entries */
40short free_msgmaps; /* head of linked list of free map entries */
41struct msg *free_msghdrs; /* list of free msg headers */
42char *msgpool; /* MSGMAX byte long msg buffer pool */
43struct msgmap *msgmaps; /* MSGSEG msgmap structures */
44struct msg *msghdrs; /* MSGTQL msg headers */
45struct msqid_ds *msqids; /* MSGMNI msqid_ds struct's */
46
47void
48msginit(udata)
49 caddr_t udata;
49 void *udata;
50{
51 register int i;
52
53 /*
54 * msginfo.msgssz should be a power of two for efficiency reasons.
55 * It is also pretty silly if msginfo.msgssz is less than 8
56 * or greater than about 256 so ...
57 */

--- 949 unchanged lines hidden ---
50{
51 register int i;
52
53 /*
54 * msginfo.msgssz should be a power of two for efficiency reasons.
55 * It is also pretty silly if msginfo.msgssz is less than 8
56 * or greater than about 256 so ...
57 */

--- 949 unchanged lines hidden ---