sleep, tsleep and wakeup really take void *'s, not caddr_t's.
[unix-history] / usr / src / sys / kern / kern_synch.c
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;