/openbsd-current/gnu/gcc/libgomp/config/posix95/ |
H A D | lock.c | 38 omp_init_lock (omp_lock_t *lock) argument 40 pthread_mutex_init (lock, NULL); 44 omp_destroy_lock (omp_lock_t *lock) argument 46 pthread_mutex_destroy (lock); 50 omp_set_lock (omp_lock_t *lock) argument 52 pthread_mutex_lock (lock); 56 omp_unset_lock (omp_lock_t *lock) argument 58 pthread_mutex_unlock (lock); 62 omp_test_lock (omp_lock_t *lock) argument 64 return pthread_mutex_trylock (lock) 68 omp_init_nest_lock(omp_nest_lock_t *lock) argument 76 omp_destroy_nest_lock(omp_nest_lock_t *lock) argument 82 omp_set_nest_lock(omp_nest_lock_t *lock) argument 96 omp_unset_nest_lock(omp_nest_lock_t *lock) argument 108 omp_test_nest_lock(omp_nest_lock_t *lock) argument [all...] |
/openbsd-current/sys/arch/luna88k/include/ |
H A D | lock.h | 1 /* $OpenBSD: lock.h,v 1.1 2005/12/03 19:04:03 miod Exp $ */ 3 #include <m88k/lock.h>
|
/openbsd-current/gnu/gcc/libgomp/config/posix/ |
H A D | lock.c | 47 omp_init_lock (omp_lock_t *lock) argument 49 pthread_mutex_init (lock, NULL); 53 omp_destroy_lock (omp_lock_t *lock) argument 55 pthread_mutex_destroy (lock); 59 omp_set_lock (omp_lock_t *lock) argument 61 pthread_mutex_lock (lock); 65 omp_unset_lock (omp_lock_t *lock) argument 67 pthread_mutex_unlock (lock); 71 omp_test_lock (omp_lock_t *lock) argument 73 return pthread_mutex_trylock (lock) 77 omp_init_nest_lock(omp_nest_lock_t *lock) argument 89 omp_destroy_nest_lock(omp_nest_lock_t *lock) argument 95 omp_set_nest_lock(omp_nest_lock_t *lock) argument 102 omp_unset_nest_lock(omp_nest_lock_t *lock) argument 109 omp_test_nest_lock(omp_nest_lock_t *lock) argument [all...] |
H A D | omp-lock.h | 11 typedef struct { pthread_mutex_t lock; int count; } omp_nest_lock_t; member in struct:__anon407
|
/openbsd-current/lib/librthread/ |
H A D | rthread_spin_lock.c | 26 pthread_spin_init(pthread_spinlock_t *lock, int pshared) argument 30 if (lock == NULL) 40 l->lock = _SPINLOCK_UNLOCKED; 41 *lock = l; 46 pthread_spin_destroy(pthread_spinlock_t *lock) argument 48 if (lock == NULL || *lock == NULL) 51 if ((*lock)->owner != NULL) 54 free(*lock); 55 *lock 60 pthread_spin_trylock(pthread_spinlock_t *lock) argument 80 pthread_spin_lock(pthread_spinlock_t *lock) argument 99 pthread_spin_unlock(pthread_spinlock_t *lock) argument [all...] |
H A D | rthread_rwlock_compat.c | 38 pthread_rwlock_t lock; local 40 lock = calloc(1, sizeof(*lock)); 41 if (!lock) 43 lock->lock = _SPINLOCK_UNLOCKED; 44 TAILQ_INIT(&lock->writers); 46 *lockp = lock; 55 pthread_rwlock_t lock; local 58 lock 97 pthread_rwlock_t lock; local 156 pthread_rwlock_t lock; local 221 pthread_rwlock_t lock; local [all...] |
/openbsd-current/sys/dev/pci/drm/include/linux/ |
H A D | lockdep.h | 14 #define might_lock(lock) 15 #define might_lock_nested(lock, subc) 17 #define lockdep_assert_held(lock) do { (void)(lock); } while(0) 18 #define lockdep_assert_held_once(lock) do { (void)(lock); } while(0) 19 #define lockdep_assert_once(lock) do { (void)(lock); } while(0) 20 #define lockdep_assert_not_held(lock) do { (void)(lock); } whil [all...] |
H A D | ww_mutex.h | 88 ww_mutex_init(struct ww_mutex *lock, struct ww_class *ww_class) { argument 89 mtx_init(&lock->base, IPL_NONE); 90 lock->acquired = 0; 91 lock->ctx = NULL; 92 lock->owner = NULL; 96 ww_mutex_is_locked(struct ww_mutex *lock) { argument 98 mtx_enter(&lock->base); 99 if (lock->acquired > 0) res = true; 100 mtx_leave(&lock->base); 105 * Return 1 if lock coul 108 ww_mutex_trylock(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) argument 133 __ww_mutex_lock(struct ww_mutex *lock, struct ww_acquire_ctx *ctx, bool slow, bool intr) argument 209 ww_mutex_lock(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) argument 214 ww_mutex_lock_slow(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) argument 219 ww_mutex_lock_interruptible(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) argument 224 ww_mutex_lock_slow_interruptible(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) argument 229 ww_mutex_unlock(struct ww_mutex *lock) argument 242 ww_mutex_destroy(struct ww_mutex *lock) argument [all...] |
H A D | completion.h | 28 struct mutex lock; member in struct:completion 38 mtx_init(&x->lock, IPL_TTY); 54 mtx_enter(&x->lock); 56 ret = msleep(x, &x->lock, 0, "wfct", timo); 58 mtx_leave(&x->lock); 65 mtx_leave(&x->lock); 75 mtx_enter(&x->lock); 77 msleep_nsec(x, &x->lock, 0, "wfcom", INFSLP); 81 mtx_leave(&x->lock); 91 mtx_enter(&x->lock); [all...] |
/openbsd-current/gnu/gcc/libgomp/config/linux/ |
H A D | lock.c | 43 omp_init_lock (omp_lock_t *lock) argument 45 gomp_mutex_init (lock); 49 omp_destroy_lock (omp_lock_t *lock) argument 51 gomp_mutex_destroy (lock); 55 omp_set_lock (omp_lock_t *lock) argument 57 gomp_mutex_lock (lock); 61 omp_unset_lock (omp_lock_t *lock) argument 63 gomp_mutex_unlock (lock); 67 omp_test_lock (omp_lock_t *lock) argument 69 return __sync_bool_compare_and_swap (lock, 111 omp_init_nest_lock(omp_nest_lock_t *lock) argument 117 omp_destroy_nest_lock(omp_nest_lock_t *lock) argument 122 omp_set_nest_lock(omp_nest_lock_t *lock) argument 145 omp_unset_nest_lock(omp_nest_lock_t *lock) argument 157 omp_test_nest_lock(omp_nest_lock_t *lock) argument [all...] |
/openbsd-current/usr.sbin/unbound/util/ |
H A D | locks.h | 49 * o lock_rw: lock that has many readers and one writer (to a data entry). 51 * This lock is meant for non performance sensitive uses. 52 * o lock_quick: speed lock. For performance sensitive locking of critical 86 #define lock_protect(lock, area, size) /* nop */ 87 #define lock_unprotect(lock, area) /* nop */ 88 #define lock_get_mem(lock) (0) /* nothing */ 97 /** use pthread mutex for basic lock */ 100 #define lock_basic_init(lock) LOCKRET(pthread_mutex_init(lock, NULL)) 101 #define lock_basic_destroy(lock) LOCKRE [all...] |
/openbsd-current/sbin/unwind/libunbound/util/ |
H A D | locks.h | 49 * o lock_rw: lock that has many readers and one writer (to a data entry). 51 * This lock is meant for non performance sensitive uses. 52 * o lock_quick: speed lock. For performance sensitive locking of critical 86 #define lock_protect(lock, area, size) /* nop */ 87 #define lock_unprotect(lock, area) /* nop */ 88 #define lock_get_mem(lock) (0) /* nothing */ 97 /** use pthread mutex for basic lock */ 100 #define lock_basic_init(lock) LOCKRET(pthread_mutex_init(lock, NULL)) 101 #define lock_basic_destroy(lock) LOCKRE [all...] |
/openbsd-current/sys/sys/ |
H A D | witness.h | 31 * $FreeBSD: head/sys/sys/lock.h 313908 2017-02-18 01:52:10Z mjg $ 41 * array. Debugging code looks up the lock class for a given lock object 44 #define LO_CLASSINDEX(lock) \ 45 ((((lock)->lo_flags) & LO_CLASSMASK) >> LO_CLASSSHIFT) 46 #define LOCK_CLASS(lock) \ 47 (lock_classes[LO_CLASSINDEX((lock))]) 52 * Option flags passed to lock operations that witness also needs to know 55 #define LOP_NEWORDER 0x00000001 /* Define a new lock order. */ 57 #define LOP_TRYLOCK 0x00000004 /* Don't check lock orde [all...] |
/openbsd-current/lib/libc/arch/powerpc/gen/ |
H A D | _atomic_lock.c | 19 * Atomic lock for powerpc 25 _atomic_lock(volatile _atomic_lock_t *lock) argument 33 : "=r" (old), "=r" (lock) 34 : "r" (_ATOMIC_LOCK_LOCKED), "1" (lock) : "0"
|
/openbsd-current/lib/libc/arch/powerpc64/gen/ |
H A D | _atomic_lock.c | 19 * Atomic lock for powerpc 25 _atomic_lock(volatile _atomic_lock_t *lock) argument 33 : "=r" (old), "=r" (lock) 34 : "r" (_ATOMIC_LOCK_LOCKED), "1" (lock) : "0"
|
/openbsd-current/lib/libc/arch/sh/gen/ |
H A D | _atomic_lock.c | 35 _atomic_lock(volatile _atomic_lock_t *lock) argument 43 : "=m" (*lock), "=r" (old));
|
/openbsd-current/lib/libc/arch/sparc64/gen/ |
H A D | _atomic_lock.c | 5 * Atomic lock for sparc64 11 _atomic_lock(volatile _atomic_lock_t * lock) argument 38 __asm__("ldstub [%1], %0" : "=&r" (old) : "r" (lock) : "memory");
|
/openbsd-current/lib/libc/arch/hppa/gen/ |
H A D | _atomic_lock.c | 25 _atomic_lock(volatile _atomic_lock_t *lock) argument 30 if ((unsigned long)lock & 0xf) { 31 printf("lock not 16 byte aligned\n"); 37 : "=&r" (old), "+m" (lock) 38 : "r" (lock));
|
/openbsd-current/sys/dev/pci/drm/ |
H A D | drm_lock.c | 50 * Take the heavyweight lock. 52 * \param lock lock pointer. 54 * \return one if the lock is held, or zero otherwise. 56 * Attempt to mark the lock as held by the given context, via the \p cmpxchg instruction. 63 volatile unsigned int *lock = &lock_data->hw_lock->lock; local 67 old = *lock; 75 prev = cmpxchg(lock, old, new); 82 DRM_ERROR("%d holds heavyweight lock\ 112 volatile unsigned int *lock = &lock_data->hw_lock->lock; local 127 volatile unsigned int *lock = &lock_data->hw_lock->lock; local 168 struct drm_lock *lock = data; local 259 struct drm_lock *lock = data; local 312 volatile unsigned int *lock = &lock_data->hw_lock->lock; local [all...] |
/openbsd-current/gnu/usr.bin/perl/t/op/ |
H A D | lock.t | 10 is \lock $foo, \$foo, 'lock returns a scalar argument'; 11 is lock @foo, \@foo, 'lock returns a ref to its array argument'; 12 is lock %foo, \%foo, 'lock returns a ref to its hash argument'; 13 is lock &foo, \&foo, 'lock returns a ref to its code argument'; 16 is lock &eulavl, \&eulavl, 'lock return [all...] |
/openbsd-current/sys/kern/ |
H A D | vfs_lockf.c | 49 * associated with a byte range lock. The lockf structures are linked into 50 * the inode structure. Locks are sorted by the starting byte of the lock for 58 off_t lf_start; /* The byte # of the start of the lock */ 59 off_t lf_end; /* The byte # of the end of the lock (-1=EOF)*/ 60 caddr_t lf_id; /* The id of the resource holding the lock */ 61 struct lockf_state *lf_state; /* State associated with the lock */ 63 struct lockf *lf_blk; /* The lock that blocks us */ 65 TAILQ_ENTRY(lockf) lf_block; /* A request waiting for a lock */ 161 * Splitting a lock will always succeed, regardless of current allocations. 176 struct lockf *lock; local 192 lf_free(struct lockf *lock) argument 220 struct lockf *lock; local 323 lf_setlock(struct lockf *lock) argument 530 lf_clearlock(struct lockf *lock) argument 587 lf_getlock(struct lockf *lock, struct flock *fl) argument 616 lf_getblock(struct lockf *lf, struct lockf *lock) argument 645 lf_findoverlap(struct lockf *lf, struct lockf *lock, int type, struct lockf **overlap) argument 727 struct lockf *lock; local 816 lf_wakelock(struct lockf *lock, int flags) argument 834 lf_deadlock(struct lockf *lock) argument 862 lf_print(const char *tag, struct lockf *lock) argument 891 lf_printlist(const char *tag, struct lockf *lock) argument [all...] |
/openbsd-current/gnu/gcc/libgomp/ |
H A D | fortran.c | 66 omp_init_lock_ (omp_lock_arg_t lock) 69 omp_lock_arg (lock) = malloc (sizeof (omp_lock_t)); 71 omp_init_lock (omp_lock_arg (lock)); 75 omp_init_nest_lock_ (omp_nest_lock_arg_t lock) argument 78 omp_nest_lock_arg (lock) = malloc (sizeof (omp_nest_lock_t)); 80 omp_init_nest_lock (omp_nest_lock_arg (lock)); 84 omp_destroy_lock_ (omp_lock_arg_t lock) argument 86 omp_destroy_lock (omp_lock_arg (lock)); 88 free (omp_lock_arg (lock)); 89 omp_lock_arg (lock) 94 omp_destroy_nest_lock_(omp_nest_lock_arg_t lock) argument 104 omp_set_lock_(omp_lock_arg_t lock) argument 110 omp_set_nest_lock_(omp_nest_lock_arg_t lock) argument 116 omp_unset_lock_(omp_lock_arg_t lock) argument 122 omp_unset_nest_lock_(omp_nest_lock_arg_t lock) argument 182 omp_test_lock_(omp_lock_arg_t lock) argument 212 omp_test_nest_lock_(omp_nest_lock_arg_t lock) argument [all...] |
/openbsd-current/usr.sbin/unbound/testcode/ |
H A D | checklocks.h | 43 * Holds information per lock and per thread. 47 * o which func, file, line created the lock. 48 * o contention count, measures amount of contention on the lock. 49 * o the memory region(s) that the lock protects are 56 * o Detects unprotected memory access when the lock is locked or freed, 68 /* we need the *timed*lock() routines to use for deadlock detection. */ 82 * Note that it may encompass the lock structure. 113 * linked list. The first element is the most recent lock acquired. 117 /** if the thread is currently waiting for a lock, which one */ 126 pthread_mutex_t lock; member in struct:checked_lock [all...] |
/openbsd-current/lib/libc/arch/amd64/gen/ |
H A D | _atomic_lock.c | 6 * Atomic lock for amd64 -- taken from i386 code. 12 _atomic_lock(volatile _atomic_lock_t *lock) argument 17 * Use the eXCHanGe instruction to swap the lock value with 23 : "0" (old), "r" (lock));
|
/openbsd-current/lib/libc/arch/i386/gen/ |
H A D | _atomic_lock.c | 5 * Atomic lock for i386 11 _atomic_lock(volatile _atomic_lock_t *lock) argument 16 * Use the eXCHanGe instruction to swap the lock value with 22 : "0" (old), "r" (lock));
|