Exemple #1
0
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);
}
Exemple #2
0
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);
}
Exemple #3
0
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);
}