Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_lock.c
Show First 20 Lines • Show All 444 Lines • ▼ Show 20 Lines | lockinit(struct lock *lk, int pri, const char *wmesg, int timo, int flags) | ||||
if (flags & LK_NOPROFILE) | if (flags & LK_NOPROFILE) | ||||
iflags |= LO_NOPROFILE; | iflags |= LO_NOPROFILE; | ||||
if ((flags & LK_NOWITNESS) == 0) | if ((flags & LK_NOWITNESS) == 0) | ||||
iflags |= LO_WITNESS; | iflags |= LO_WITNESS; | ||||
if (flags & LK_QUIET) | if (flags & LK_QUIET) | ||||
iflags |= LO_QUIET; | iflags |= LO_QUIET; | ||||
if (flags & LK_IS_VNODE) | if (flags & LK_IS_VNODE) | ||||
iflags |= LO_IS_VNODE; | iflags |= LO_IS_VNODE; | ||||
if (flags & LK_NEW) | |||||
iflags |= LO_NEW; | |||||
iflags |= flags & (LK_ADAPTIVE | LK_NOSHARE); | iflags |= flags & (LK_ADAPTIVE | LK_NOSHARE); | ||||
lock_init(&lk->lock_object, &lock_class_lockmgr, wmesg, NULL, iflags); | lock_init(&lk->lock_object, &lock_class_lockmgr, wmesg, NULL, iflags); | ||||
lk->lk_lock = LK_UNLOCKED; | lk->lk_lock = LK_UNLOCKED; | ||||
lk->lk_recurse = 0; | lk->lk_recurse = 0; | ||||
lk->lk_exslpfail = 0; | lk->lk_exslpfail = 0; | ||||
lk->lk_timo = timo; | lk->lk_timo = timo; | ||||
lk->lk_pri = pri; | lk->lk_pri = pri; | ||||
▲ Show 20 Lines • Show All 1,224 Lines • Show Last 20 Lines |