Got rid of compiler warnings.
This commit is contained in:
parent
ac48588ac5
commit
789668e2a4
@ -1,4 +1,4 @@
|
||||
/* $Id$ */
|
||||
/* $Id: sysv_msg.c,v 1.1 1994/09/13 14:46:57 dfr Exp $ */
|
||||
|
||||
/*
|
||||
* Implementation of SVID messages
|
||||
@ -37,7 +37,7 @@ int nfree_msgmaps; /* # of free map entries */
|
||||
short free_msgmaps; /* head of linked list of free map entries */
|
||||
struct msg *free_msghdrs; /* list of free msg headers */
|
||||
|
||||
int
|
||||
void
|
||||
msginit()
|
||||
{
|
||||
register int i;
|
||||
@ -288,7 +288,7 @@ msgget(p, uap, retval)
|
||||
int key = uap->key;
|
||||
int msgflg = uap->msgflg;
|
||||
struct ucred *cred = p->p_ucred;
|
||||
register struct msqid_ds *msqptr;
|
||||
register struct msqid_ds *msqptr = NULL;
|
||||
|
||||
#ifdef MSG_DEBUG_OK
|
||||
printf("msgget(0x%x, 0%o)\n", key, msgflg);
|
||||
@ -450,7 +450,7 @@ msgsnd(p, uap, retval)
|
||||
* (inside this loop in case msg_qbytes changes while we sleep)
|
||||
*/
|
||||
|
||||
if (msgsz < 0 || msgsz > msqptr->msg_qbytes) {
|
||||
if (msgsz > msqptr->msg_qbytes) {
|
||||
#ifdef MSG_DEBUG_OK
|
||||
printf("msgsz > msqptr->msg_qbytes\n");
|
||||
#endif
|
||||
@ -774,13 +774,6 @@ msgrcv(p, uap, retval)
|
||||
return(eval);
|
||||
}
|
||||
|
||||
if (msgsz < 0) {
|
||||
#ifdef MSG_DEBUG_OK
|
||||
printf("msgsz < 0\n");
|
||||
#endif
|
||||
return(EINVAL);
|
||||
}
|
||||
|
||||
msghdr = NULL;
|
||||
while (msghdr == NULL) {
|
||||
if (msgtyp == 0) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id$ */
|
||||
/* $Id: sysv_sem.c,v 1.1 1994/09/13 14:47:00 dfr Exp $ */
|
||||
|
||||
/*
|
||||
* Implementation of SVID semaphores
|
||||
@ -21,7 +21,7 @@ int semtot = 0;
|
||||
|
||||
static struct proc *semlock_holder = NULL;
|
||||
|
||||
int
|
||||
void
|
||||
seminit()
|
||||
{
|
||||
register int i;
|
||||
@ -182,6 +182,7 @@ semu_alloc(p)
|
||||
panic("semu_alloc - second attempt failed");
|
||||
}
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -833,6 +834,7 @@ semop(p, uap, retval)
|
||||
* Go through the undo structures for this process and apply the adjustments to
|
||||
* semaphores.
|
||||
*/
|
||||
void
|
||||
semexit(p)
|
||||
struct proc *p;
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id$ */
|
||||
/* $Id: msg.h,v 1.1 1994/09/13 14:47:34 dfr Exp $ */
|
||||
/* $NetBSD: msg.h,v 1.4 1994/06/29 06:44:43 cgd Exp $ */
|
||||
|
||||
/*
|
||||
@ -92,9 +92,9 @@ struct msginfo {
|
||||
msgssz, /* size of a message segment (see notes above) */
|
||||
msgseg; /* number of message segments */
|
||||
};
|
||||
struct msginfo msginfo;
|
||||
|
||||
#ifdef KERNEL
|
||||
extern struct msginfo msginfo;
|
||||
|
||||
#ifndef MSGSSZ
|
||||
#define MSGSSZ 8 /* Each segment must be 2^N long */
|
||||
#endif
|
||||
@ -120,13 +120,11 @@ struct msginfo msginfo;
|
||||
#define MSQID(ix,ds) ((ix) & 0xffff | (((ds).msg_perm.seq << 16) & 0xffff0000))
|
||||
#define MSQID_IX(id) ((id) & 0xffff)
|
||||
#define MSQID_SEQ(id) (((id) >> 16) & 0xffff)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The rest of this file is specific to this particular implementation.
|
||||
*/
|
||||
|
||||
#ifdef KERNEL
|
||||
|
||||
/*
|
||||
* Stuff allocated in machdep.h
|
||||
@ -144,7 +142,7 @@ struct msqid_ds *msqids; /* MSGMNI msqid_ds struct's */
|
||||
|
||||
#define MSG_LOCKED 01000 /* Is this msqid_ds locked? */
|
||||
|
||||
#endif
|
||||
#endif /* KERNEL */
|
||||
|
||||
#ifndef KERNEL
|
||||
#include <sys/cdefs.h>
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id$ */
|
||||
/* $Id: sem.h,v 1.1 1994/09/13 14:47:35 dfr Exp $ */
|
||||
/* $NetBSD: sem.h,v 1.5 1994/06/29 06:45:15 cgd Exp $ */
|
||||
|
||||
/*
|
||||
@ -106,7 +106,7 @@ struct seminfo {
|
||||
semvmx, /* semaphore maximum value */
|
||||
semaem; /* adjust on exit max value */
|
||||
};
|
||||
struct seminfo seminfo;
|
||||
extern struct seminfo seminfo;
|
||||
|
||||
/* internal "mode" bits */
|
||||
#define SEM_ALLOC 01000 /* semaphore is allocated */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id$ */
|
||||
/* $Id: shm.h,v 1.1 1994/09/13 14:47:36 dfr Exp $ */
|
||||
/* $NetBSD: shm.h,v 1.15 1994/06/29 06:45:17 cgd Exp $ */
|
||||
|
||||
/*
|
||||
@ -70,7 +70,7 @@ struct shminfo {
|
||||
shmseg, /* max shared memory segments per process */
|
||||
shmall; /* max amount of shared memory (pages) */
|
||||
};
|
||||
struct shminfo shminfo;
|
||||
extern struct shminfo shminfo;
|
||||
struct shmid_ds *shmsegs;
|
||||
|
||||
#else /* !KERNEL */
|
||||
|
Loading…
Reference in New Issue
Block a user