Home
last modified time | relevance | path

Searched refs:nlocks (Results 1 – 24 of 24) sorted by relevance

/netbsd-src/sys/rump/librump/rumpkern/
H A Dklock.c67 rump_kernel_bigwrap(int *nlocks) in rump_kernel_bigwrap() argument
74 *nlocks = giantcnt; in rump_kernel_bigwrap()
79 rump_kernel_bigunwrap(int nlocks) in rump_kernel_bigunwrap() argument
84 giantcnt = nlocks; in rump_kernel_bigunwrap()
88 _kernel_lock(int nlocks) in _kernel_lock() argument
92 while (nlocks) { in _kernel_lock()
94 giantcnt += nlocks; in _kernel_lock()
95 nlocks = 0; in _kernel_lock()
108 nlocks--; in _kernel_lock()
114 _kernel_unlock(int nlocks, int *countp) in _kernel_unlock() argument
[all …]
H A Dsleepq.c62 int nlocks; in sleepq_enter() local
68 if ((nlocks = l->l_blcnt) != 0) { in sleepq_enter()
71 return nlocks; in sleepq_enter()
87 sleepq_block(int timo, bool catch, syncobj_t *syncobj __unused, int nlocks) in sleepq_block() argument
106 if (nlocks) in sleepq_block()
107 KERNEL_LOCK(nlocks, curlwp); in sleepq_block()
H A Dltsleep.c123 int rv, nlocks; in tsleep() local
132 rump_kernel_bigwrap(&nlocks); in tsleep()
135 rump_kernel_bigunwrap(nlocks); in tsleep()
H A Dscheduler.c514 int nlocks; in yield() local
516 KERNEL_UNLOCK_ALL(l, &nlocks); in yield()
519 KERNEL_LOCK(nlocks, l); in yield()
H A Dlwproc.c455 int nlocks; in rump_lwproc_switch() local
474 KERNEL_UNLOCK_ALL(NULL, &nlocks); in rump_lwproc_switch()
483 KERNEL_LOCK(nlocks, NULL); in rump_lwproc_switch()
/netbsd-src/sys/kern/
H A Dkern_lock.c194 _kernel_lock(int nlocks) in _kernel_lock() argument
208 _KERNEL_LOCK_ASSERT(nlocks > 0); in _kernel_lock()
214 ci->ci_biglock_count += nlocks; in _kernel_lock()
215 l->l_blcnt += nlocks; in _kernel_lock()
228 ci->ci_biglock_count = nlocks; in _kernel_lock()
229 l->l_blcnt = nlocks; in _kernel_lock()
288 ci->ci_biglock_count = nlocks; in _kernel_lock()
289 l->l_blcnt = nlocks; in _kernel_lock()
330 _kernel_unlock(int nlocks, int *countp) in _kernel_unlock() argument
337 _KERNEL_LOCK_ASSERT(nlocks < 2); in _kernel_unlock()
[all …]
H A Dkern_condvar.c129 int nlocks; in cv_enter() local
137 nlocks = sleepq_enter(sq, l, mp); in cv_enter()
141 return nlocks; in cv_enter()
176 int nlocks; in cv_wait() local
180 nlocks = cv_enter(cv, mtx, l, false); in cv_wait()
181 (void)sleepq_block(0, false, &cv_syncobj, nlocks); in cv_wait()
197 int error, nlocks; in cv_wait_sig() local
201 nlocks = cv_enter(cv, mtx, l, true); in cv_wait_sig()
202 error = sleepq_block(0, true, &cv_syncobj, nlocks); in cv_wait_sig()
220 int error, nlocks; in cv_timedwait() local
[all …]
H A Dkern_synch.c191 int nlocks; in tsleep() local
204 nlocks = sleepq_enter(sq, l, mp); in tsleep()
206 return sleepq_block(timo, catch_p, &sleep_syncobj, nlocks); in tsleep()
217 int error, nlocks; in mtsleep() local
229 nlocks = sleepq_enter(sq, l, mp); in mtsleep()
232 error = sleepq_block(timo, catch_p, &sleep_syncobj, nlocks); in mtsleep()
247 int error, nlocks; in kpause() local
257 nlocks = sleepq_enter(NULL, l, NULL); in kpause()
259 error = sleepq_block(timo, intr, &kpause_syncobj, nlocks); in kpause()
292 int nlocks; in yield() local
[all …]
H A Dkern_sleepq.c232 int nlocks; in sleepq_enter() local
244 if (__predict_false((nlocks = l->l_blcnt) != 0)) { in sleepq_enter()
247 return nlocks; in sleepq_enter()
344 sleepq_block(int timo, bool catch_p, syncobj_t *syncobj, int nlocks) in sleepq_block() argument
444 if (__predict_false(nlocks != 0)) { in sleepq_block()
445 KERNEL_LOCK(nlocks, NULL); in sleepq_block()
H A Dkern_turnstile.c378 int nlocks; in turnstile_block() local
421 nlocks = sleepq_enter(sq, l, lock); in turnstile_block()
433 sleepq_block(0, false, sobj, nlocks); in turnstile_block()
H A Dkern_timeout.c589 int nlocks; in callout_wait() local
623 nlocks = sleepq_enter(&cc->cc_sleepq, l, cc->cc_lock); in callout_wait()
626 sleepq_block(0, false, &callout_syncobj, nlocks); in callout_wait()
/netbsd-src/lib/librumpuser/
H A Drumpuser_int.h37 rumpkern_unsched(int *nlocks, void *interlock) in rumpkern_unsched() argument
40 rumpuser__hyp.hyp_backend_unschedule(0, nlocks, interlock); in rumpkern_unsched()
44 rumpkern_sched(int nlocks, void *interlock) in rumpkern_sched() argument
47 rumpuser__hyp.hyp_backend_schedule(nlocks, interlock); in rumpkern_sched()
52 int nlocks; \
53 rumpkern_unsched(&nlocks, NULL); \
55 rumpkern_sched(nlocks, NULL); \
72 int nlocks; \
73 rumpkern_unsched(&nlocks, NULL); \
75 rumpkern_sched(nlocks, NULL); \
H A Drumpuser_file.c226 int nlocks; in rumpuser_close() local
228 rumpkern_unsched(&nlocks, NULL); in rumpuser_close()
231 rumpkern_sched(nlocks, NULL); in rumpuser_close()
256 int nlocks; in rumpuser_iovread()
258 rumpkern_unsched(&nlocks, NULL); in rumpuser_iovread()
264 rumpkern_sched(nlocks, NULL); in rumpuser_iovread()
293 int nlocks; in rumpuser_iovwrite()
295 rumpkern_unsched(&nlocks, NULL); in rumpuser_iovwrite()
301 rumpkern_sched(nlocks, NULL); in rumpuser_iovwrite()
253 int nlocks; rumpuser_iovread() local
286 int nlocks; rumpuser_iovwrite() local
H A Drumpuser_component.c50 int nlocks; in rumpuser_component_unschedule() local
52 rumpkern_unsched(&nlocks, NULL); in rumpuser_component_unschedule()
53 return (void *)(intptr_t)nlocks; in rumpuser_component_unschedule()
59 int nlocks = (int)(intptr_t)cookie; in rumpuser_component_schedule() local
61 rumpkern_sched(nlocks, NULL); in rumpuser_component_schedule()
H A Drumpfiber.c489 int nlocks; in rumpuser_clock_sleep() local
491 rumpkern_unsched(&nlocks, NULL); in rumpuser_clock_sleep()
502 rumpkern_sched(nlocks, NULL); in rumpuser_clock_sleep()
706 int nlocks; in rumpuser_mutex_enter() local
709 rumpkern_unsched(&nlocks, NULL); in rumpuser_mutex_enter()
712 rumpkern_sched(nlocks, NULL); in rumpuser_mutex_enter()
793 int nlocks; in rumpuser_rw_enter() local
805 rumpkern_unsched(&nlocks, NULL); in rumpuser_rw_enter()
808 rumpkern_sched(nlocks, NULL); in rumpuser_rw_enter()
929 cv_unsched(struct rumpuser_mtx *mtx, int *nlocks) in cv_unsched() argument
[all …]
H A Drumpuser_pth.c519 cv_unschedule(struct rumpuser_mtx *mtx, int *nlocks) in cv_unschedule() argument
522 rumpkern_unsched(nlocks, mtx); in cv_unschedule()
527 cv_reschedule(struct rumpuser_mtx *mtx, int nlocks) in cv_reschedule() argument
548 rumpkern_sched(nlocks, mtx); in cv_reschedule()
552 rumpkern_sched(nlocks, mtx); in cv_reschedule()
559 int nlocks; in rumpuser_cv_wait() local
562 cv_unschedule(mtx, &nlocks); in rumpuser_cv_wait()
564 cv_reschedule(mtx, nlocks); in rumpuser_cv_wait()
584 int rv, nlocks; in rumpuser_cv_timedwait() local
596 cv_unschedule(mtx, &nlocks); in rumpuser_cv_timedwait()
[all …]
H A Drumpuser_bio.c140 int nlocks; in rumpuser_bio() local
142 rumpkern_unsched(&nlocks, NULL); in rumpuser_bio()
188 rumpkern_sched(nlocks, NULL); in rumpuser_bio()
H A Drumpuser_sp.c787 int rv, nlocks; in sp_copyin() local
789 rumpkern_unsched(&nlocks, NULL); in sp_copyin()
799 rumpkern_sched(nlocks, NULL); in sp_copyin()
827 int nlocks, rv; in sp_copyout() local
829 rumpkern_unsched(&nlocks, NULL); in sp_copyout()
831 rumpkern_sched(nlocks, NULL); in sp_copyout()
861 int nlocks, rv; in rumpuser_sp_anonmmap() local
863 rumpkern_unsched(&nlocks, NULL); in rumpuser_sp_anonmmap()
881 rumpkern_sched(nlocks, NULL); in rumpuser_sp_anonmmap()
889 int rv, nlocks; in rumpuser_sp_raise() local
[all …]
H A Drumpuser.c118 int nlocks; in rumpuser_clock_sleep() local
121 rumpkern_unsched(&nlocks, NULL); in rumpuser_clock_sleep()
169 rumpkern_sched(nlocks, NULL); in rumpuser_clock_sleep()
/netbsd-src/external/mpl/dhcp/bind/dist/lib/isc/
H A Dtls.c44 static int nlocks; variable
72 nlocks = CRYPTO_num_locks(); in tls_initialize()
86 locks = calloc(nlocks, sizeof(locks[0])); in tls_initialize()
87 isc_mutexblock_init(locks, nlocks); in tls_initialize()
148 isc_mutexblock_destroy(locks, nlocks); in tls_shutdown()
/netbsd-src/tests/fs/vfs/
H A Dt_vnops.c955 unsigned int nlocks; in fcntl_getlock_pids() local
960 nlocks = fcntl_getlocks(fd[i], 0, sz, in fcntl_getlock_pids()
964 ATF_REQUIRE(nlocks < __arraycount(result)); in fcntl_getlock_pids()
965 result[nlocks] = lock[i]; in fcntl_getlock_pids()
966 result[nlocks].l_pid = pid[i]; in fcntl_getlock_pids()
967 nlocks++; in fcntl_getlock_pids()
970 ATF_CHECK_EQ(nlocks, __arraycount(expect)); in fcntl_getlock_pids()
972 qsort(result, nlocks, sizeof(result[0]), &flock_compare); in fcntl_getlock_pids()
974 for (j = 0; j < nlocks; j++) { in fcntl_getlock_pids()
/netbsd-src/tests/kernel/
H A Dt_lockf.c56 #define nlocks 500 /* number of locks per thread */ macro
84 for (i = 0; i < nlocks; i++) { in trylocks()
/netbsd-src/external/mpl/bind/dist/lib/isc/
H A Dtls.c63 static int nlocks;
181 nlocks = CRYPTO_num_locks(); in isc_tlsctx_free()
182 locks = isc_mem_cget(isc__tls_mctx, nlocks, sizeof(locks[0])); in isc_tlsctx_free()
183 isc_mutexblock_init(locks, nlocks); in isc_tlsctx_free()
230 isc_mutexblock_destroy(locks, nlocks); in isc_tlsctx_createclient()
231 isc_mem_cput(isc__tls_mctx, locks, nlocks, sizeof(locks[0])); in isc_tlsctx_createclient()
66 static int nlocks; global() variable
/netbsd-src/sys/uvm/pmap/
H A Dpmap.c2267 const size_t nlocks = PAGE_SIZE / cache_line_size; in pmap_pvlist_lock_init() local
2268 KASSERT((nlocks & (nlocks - 1)) == 0); in pmap_pvlist_lock_init()
2272 for (size_t i = 0; i < nlocks; lock_va += cache_line_size, i++) { in pmap_pvlist_lock_init()
2277 pli->pli_lock_mask = nlocks - 1; in pmap_pvlist_lock_init()