static void qinit_common(struct queue *q) { spinlock_init_irqsave(&q->lock); qlock_init(&q->rlock); qlock_init(&q->wlock); rendez_init(&q->rr); rendez_init(&q->wr); }
void netloginit(struct Fs *f) { f->alog = kzmalloc(sizeof(struct Netlog), 0); spinlock_init(&f->alog->lock); qlock_init(&f->alog->qlock); rendez_init(&f->alog->r); }
void arpinit(struct Fs *f) { f->arp = kzmalloc(sizeof(struct arp), MEM_WAIT); qlock_init(&f->arp->qlock); rendez_init(&f->arp->rxmtq); f->arp->f = f; f->arp->rxmt = NULL; f->arp->dropf = f->arp->dropl = NULL; ktask("rxmitproc", rxmitproc, f->arp); }