sleep, tsleep and wakeup really take void *'s, not caddr_t's.
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 29 Feb 1992 09:24:15 +0000 (01:24 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 29 Feb 1992 09:24:15 +0000 (01:24 -0800)
SCCS-vsn: sys/sys/proc.h 7.33
SCCS-vsn: sys/kern/kern_synch.c 7.23

usr/src/sys/kern/kern_synch.c
usr/src/sys/sys/proc.h

index 61badf7..9271372 100644 (file)
@@ -5,7 +5,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)kern_synch.c        7.22 (Berkeley) %G%
+ *     @(#)kern_synch.c        7.23 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -237,7 +237,7 @@ int safepri;
  * be interrupted by the signal (return EINTR).
  */
 tsleep(chan, pri, wmesg, timo)
  * be interrupted by the signal (return EINTR).
  */
 tsleep(chan, pri, wmesg, timo)
-       caddr_t chan;
+       void *chan;
        int pri;
        char *wmesg;
        int timo;
        int pri;
        char *wmesg;
        int timo;
@@ -266,7 +266,7 @@ tsleep(chan, pri, wmesg, timo)
                return (0);
        }
 #ifdef DIAGNOSTIC
                return (0);
        }
 #ifdef DIAGNOSTIC
-       if (chan == 0 || p->p_stat != SRUN || p->p_rlink)
+       if (chan == NULL || p->p_stat != SRUN || p->p_rlink)
                panic("tsleep");
 #endif
        p->p_wchan = chan;
                panic("tsleep");
 #endif
        p->p_wchan = chan;
@@ -363,7 +363,7 @@ endtsleep(p)
  * Short-term, non-interruptable sleep.
  */
 sleep(chan, pri)
  * Short-term, non-interruptable sleep.
  */
 sleep(chan, pri)
-       caddr_t chan;
+       void *chan;
        int pri;
 {
        register struct proc *p = curproc;
        int pri;
 {
        register struct proc *p = curproc;
@@ -374,7 +374,7 @@ sleep(chan, pri)
 #ifdef DIAGNOSTIC
        if (pri > PZERO) {
                printf("sleep called with pri %d > PZERO, wchan: %x\n",
 #ifdef DIAGNOSTIC
        if (pri > PZERO) {
                printf("sleep called with pri %d > PZERO, wchan: %x\n",
-                       pri, chan);
+                   pri, chan);
                panic("old sleep");
        }
 #endif
                panic("old sleep");
        }
 #endif
@@ -391,7 +391,7 @@ sleep(chan, pri)
                return;
        }
 #ifdef DIAGNOSTIC
                return;
        }
 #ifdef DIAGNOSTIC
-       if (chan==0 || p->p_stat != SRUN || p->p_rlink)
+       if (chan == NULL || p->p_stat != SRUN || p->p_rlink)
                panic("sleep");
 #endif
        p->p_wchan = chan;
                panic("sleep");
 #endif
        p->p_wchan = chan;
@@ -447,7 +447,7 @@ unsleep(p)
  * sleeping on chan to run state.
  */
 wakeup(chan)
  * sleeping on chan to run state.
  */
 wakeup(chan)
-       register caddr_t chan;
+       register void *chan;
 {
        register struct slpque *qp;
        register struct proc *p, **q;
 {
        register struct slpque *qp;
        register struct proc *p, **q;
index 0dc428b..20b23df 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)proc.h      7.32 (Berkeley) %G%
+ *     @(#)proc.h      7.33 (Berkeley) %G%
  */
 
 #ifndef _PROC_H_
  */
 
 #ifndef _PROC_H_
@@ -218,10 +218,10 @@ struct    prochd {
 
 int    whichqs;                /* bit mask summarizing non-empty qs's */
 
 
 int    whichqs;                /* bit mask summarizing non-empty qs's */
 
-int    sleep __P((caddr_t chan, int pri));
-int    tsleep __P((caddr_t chan, int pri, char *wmesg, int timo));
+int    sleep __P((void *chan, int pri));
+int    tsleep __P((void *chan, int pri, char *wmesg, int timo));
 int    unsleep __P((struct proc *));
 int    unsleep __P((struct proc *));
-int    wakeup __P((caddr_t));
+int    wakeup __P((void *chan));
 int    setrun __P((struct proc *));
 int    setpri __P((struct proc *));
 
 int    setrun __P((struct proc *));
 int    setpri __P((struct proc *));