Open mode checks, don't use == for OREAD
[akaros.git] / kern / src / net / igmp.c
index 109df30..8952726 100644 (file)
@@ -117,7 +117,7 @@ igmpproc(void *a)
        USED(a);
 
        for(;;){
-               sleep(&igmpalloc.r, isreport, 0);
+               rendez_sleep(&igmpalloc.r, isreport, 0);
                for(;;){
                        lock(&igmpalloc);
 
@@ -158,7 +158,7 @@ igmpproc(void *a)
                                continue;
                        }
 
-                       tsleep(&up->sleep, return0, 0, MSPTICK);
+                       udelay_sched(MSPTICK * 1000);
                }
                unlock(&igmpalloc);
        }
@@ -222,7 +222,7 @@ igmpiput(Media *m, Ipifc *, Block *bp)
                rp->next = igmpalloc.reports;
                igmpalloc.reports = rp;
 
-               wakeup(&igmpalloc.r);
+               rendez_wakeup(&igmpalloc.r);
 
                break;
        case IGMPreport:
@@ -285,7 +285,7 @@ igmpinit(Fs *fs)
        igmp.ptclsize = 0;
 
        igmpreportfn = igmpsendreport;
-       kproc("igmpproc", igmpproc, 0, 0);
+       ktask("igmpproc", igmpproc, 0);
 
        Fsproto(fs, &igmp);
 }