/freebsd-10.0-release/sys/contrib/octeon-sdk/ |
H A D | cvmx-rwlock.h | 67 /* Flags for lock value in rw lock structure */ 73 * is waiting, no readers are given the lock until all writers are done. 77 volatile uint32_t lock; member in struct:__anon7091 83 * Initialize a reader/writer lock. This must be done 86 * @param lock pointer to rwlock structure 88 static inline void cvmx_rwlock_wp_init(cvmx_rwlock_wp_lock_t *lock) argument 90 lock->lock = 0; 91 lock 104 cvmx_rwlock_wp_read_lock(cvmx_rwlock_wp_lock_t *lock) argument 126 cvmx_rwlock_wp_read_unlock(cvmx_rwlock_wp_lock_t *lock) argument 141 cvmx_rwlock_wp_write_lock(cvmx_rwlock_wp_lock_t *lock) argument 158 cvmx_rwlock_wp_write_unlock(cvmx_rwlock_wp_lock_t *lock) argument [all...] |
H A D | cvmx-spinlock.h | 89 * @param lock Lock to initialize 91 static inline void cvmx_spinlock_init(cvmx_spinlock_t *lock) argument 93 lock->value = CVMX_SPINLOCK_UNLOCKED_VAL; 100 * @param lock Lock to check 103 static inline int cvmx_spinlock_locked(cvmx_spinlock_t *lock) argument 105 return (lock->value != CVMX_SPINLOCK_UNLOCKED_VAL); 110 * Releases lock 112 * @param lock pointer to lock structure 114 static inline void cvmx_spinlock_unlock(cvmx_spinlock_t *lock) argument 134 cvmx_spinlock_trylock(cvmx_spinlock_t *lock) argument 160 cvmx_spinlock_lock(cvmx_spinlock_t *lock) argument 286 cvmx_spinlock_rec_init(cvmx_spinlock_rec_t *lock) argument 298 cvmx_spinlock_rec_locked(cvmx_spinlock_rec_t *lock) argument 314 _int_cvmx_spinlock_rec_unlock(cvmx_spinlock_rec_t *lock, char *filename, int linenum) argument 383 _int_cvmx_spinlock_rec_lock(cvmx_spinlock_rec_t *lock, char *filename, int linenum) argument [all...] |
/freebsd-10.0-release/lib/libc/iconv/ |
H A D | citrus_lock.h | 30 #define WLOCK(lock) if (__isthreaded) \ 31 pthread_rwlock_wrlock(lock); 32 #define UNLOCK(lock) if (__isthreaded) \ 33 pthread_rwlock_unlock(lock);
|
/freebsd-10.0-release/contrib/gcclibs/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...] |
/freebsd-10.0-release/sys/ofed/include/linux/ |
H A D | rwlock.h | 31 #include <sys/lock.h> 42 #define read_lock_irq(lock) read_lock((lock)) 43 #define read_unlock_irq(lock) read_unlock((lock)) 44 #define write_lock_irq(lock) write_lock((lock)) 45 #define write_unlock_irq(lock) write_unlock((lock)) 46 #define read_lock_irqsave(lock, flag 56 rwlock_init(rwlock_t *lock) argument [all...] |
H A D | spinlock.h | 33 #include <sys/lock.h> 49 #define spin_lock_irq(lock) spin_lock(lock) 50 #define spin_unlock_irq(lock) spin_unlock(lock) 51 #define spin_lock_irqsave(lock, flags) \ 52 do {(flags) = 0; spin_lock(lock); } while (0) 53 #define spin_unlock_irqrestore(lock, flags) \ 54 do { spin_unlock(lock); } while (0) 57 spin_lock_init(spinlock_t *lock) argument [all...] |
H A D | lockdep.h | 35 #define lockdep_set_class(lock, key)
|
/freebsd-10.0-release/sys/dev/drm2/ttm/ |
H A D | ttm_lock.c | 50 void ttm_lock_init(struct ttm_lock *lock) argument 52 mtx_init(&lock->lock, "ttmlk", NULL, MTX_DEF); 53 lock->rw = 0; 54 lock->flags = 0; 55 lock->kill_takers = false; 56 lock->signal = SIGKILL; 70 void ttm_read_unlock(struct ttm_lock *lock) argument 72 mtx_lock(&lock->lock); 78 __ttm_read_lock(struct ttm_lock *lock) argument 94 ttm_read_lock(struct ttm_lock *lock, bool interruptible) argument 118 __ttm_read_trylock(struct ttm_lock *lock, bool *locked) argument 139 ttm_read_trylock(struct ttm_lock *lock, bool interruptible) argument 167 ttm_write_unlock(struct ttm_lock *lock) argument 175 __ttm_write_lock(struct ttm_lock *lock) argument 194 ttm_write_lock(struct ttm_lock *lock, bool interruptible) argument 224 ttm_write_lock_downgrade(struct ttm_lock *lock) argument 232 __ttm_vt_unlock(struct ttm_lock *lock) argument 249 struct ttm_lock *lock = container_of(base, struct ttm_lock, base); local 257 __ttm_vt_lock(struct ttm_lock *lock) argument 271 ttm_vt_lock(struct ttm_lock *lock, bool interruptible, struct ttm_object_file *tfile) argument 314 ttm_vt_unlock(struct ttm_lock *lock) argument 320 ttm_suspend_unlock(struct ttm_lock *lock) argument 328 __ttm_suspend_lock(struct ttm_lock *lock) argument 342 ttm_suspend_lock(struct ttm_lock *lock) argument [all...] |
H A D | ttm_lock.h | 34 * of the DRM heavyweight hardware lock. 35 * The lock is a read-write lock. Taking it in read mode and write mode 40 * It's allowed to leave kernel space with the vt lock held. 41 * If a user-space process dies while having the vt-lock, 42 * it will be released during the file descriptor release. The vt lock 43 * excludes write lock and read lock. 45 * The suspend mode is used to lock out all TTM users when preparing for 60 * @base: ttm base object used solely to release the lock i 72 struct mtx lock; member in struct:ttm_lock 220 ttm_lock_set_kill(struct ttm_lock *lock, bool val, int signal) argument [all...] |
/freebsd-10.0-release/contrib/gcclibs/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:__anon1178
|
/freebsd-10.0-release/contrib/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 83 #define lock_protect(lock, area, size) /* nop */ 84 #define lock_unprotect(lock, area) /* nop */ 85 #define lock_get_mem(lock) (0) /* nothing */ 94 /** use pthread mutex for basic lock */ 97 #define lock_basic_init(lock) LOCKRET(pthread_mutex_init(lock, NULL)) 98 #define lock_basic_destroy(lock) LOCKRE [all...] |
/freebsd-10.0-release/sys/cddl/compat/opensolaris/sys/ |
H A D | rwlock.h | 34 #include <sys/lock.h> 61 #define rw_init(lock, desc, type, arg) do { \ 64 KASSERT(((lock)->lock_object.lo_flags & LO_ALLMASK) != \ 65 LO_EXPECTED, ("lock %s already initialized", #lock)); \ 66 bzero((lock), sizeof(struct sx)); \ 67 for (_name = #lock; *_name != '\0'; _name++) { \ 72 _name = #lock; \ 73 sx_init_flags((lock), _name, RW_FLAGS); \ 75 #define rw_destroy(lock) sx_destro [all...] |
H A D | mutex.h | 35 #include <sys/lock.h> 55 #define mutex_init(lock, desc, type, arg) do { \ 58 KASSERT(((lock)->lock_object.lo_flags & LO_ALLMASK) != \ 59 LO_EXPECTED, ("lock %s already initialized", #lock)); \ 60 bzero((lock), sizeof(struct sx)); \ 61 for (_name = #lock; *_name != '\0'; _name++) { \ 66 _name = #lock; \ 67 sx_init_flags((lock), _name, MUTEX_FLAGS); \ 69 #define mutex_destroy(lock) sx_destro [all...] |
/freebsd-10.0-release/tools/KSE/ksetest/ |
H A D | simplelock.h | 40 simplelock_init(struct simplelock *lock) argument 42 lock->s_lock = 0; 46 simplelock_lock(struct simplelock *lock) argument 48 while (!atomic_cmpset_int(&lock->s_lock, 0, 1)) 53 simplelock_unlock(struct simplelock *lock) argument 55 atomic_store_rel_int(&lock->s_lock, 0);
|
/freebsd-10.0-release/tools/KSE/rr/ |
H A D | simplelock.h | 40 simplelock_init(struct simplelock *lock) argument 42 lock->s_lock = 0; 46 simplelock_lock(struct simplelock *lock) argument 48 while (!atomic_cmpset_int(&lock->s_lock, 0, 1)) 53 simplelock_unlock(struct simplelock *lock) argument 55 atomic_store_rel_int(&lock->s_lock, 0);
|
/freebsd-10.0-release/contrib/gcclibs/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...] |
/freebsd-10.0-release/sys/dev/drm/ |
H A D | drm_lock.c | 36 * hardware lock. 38 * The DRM hardware lock is a shared structure between the kernel and userland. 41 * client may take the lock without dropping down into the kernel, using atomic 45 * of the lock, it calls the DRM lock ioctl, which may sleep waiting for the 46 * lock, and may have side-effects of kernel-managed context switching. 48 * When the client releases the lock, if the lock is marked as being contended 57 struct drm_lock *lock = data; local 60 if (lock 111 struct drm_lock *lock = data; local 138 volatile unsigned int *lock = &lock_data->hw_lock->lock; local 169 volatile unsigned int *lock = &lock_data->hw_lock->lock; local 183 volatile unsigned int *lock = &lock_data->hw_lock->lock; local [all...] |
H A D | via_video.c | 43 XVMCLOCKPTR(dev_priv->sarea_priv, i)->lock = 0; 54 volatile int *lock; local 60 lock = (volatile int *)XVMCLOCKPTR(dev_priv->sarea_priv, i); 61 if ((_DRM_LOCKING_CONTEXT(*lock) == context)) { 62 if (_DRM_LOCK_IS_HELD(*lock) 63 && (*lock & _DRM_LOCK_CONT)) { 66 *lock = 0; 74 volatile int *lock; local 81 if (fx->lock >= VIA_NR_XVMC_LOCKS) 84 lock [all...] |
/freebsd-10.0-release/sys/dev/drm2/ |
H A D | drm_lock.c | 36 * hardware lock. 38 * The DRM hardware lock is a shared structure between the kernel and userland. 41 * client may take the lock without dropping down into the kernel, using atomic 45 * of the lock, it calls the DRM lock ioctl, which may sleep waiting for the 46 * lock, and may have side-effects of kernel-managed context switching. 48 * When the client releases the lock, if the lock is marked as being contended 57 struct drm_lock *lock = data; local 60 if (lock 111 struct drm_lock *lock = data; local 138 volatile unsigned int *lock = &lock_data->hw_lock->lock; local 169 volatile unsigned int *lock = &lock_data->hw_lock->lock; local 183 volatile unsigned int *lock = &lock_data->hw_lock->lock; local [all...] |
/freebsd-10.0-release/crypto/heimdal/lib/hx509/ |
H A D | lock.c | 60 hx509_lock_init(hx509_context context, hx509_lock *lock) argument 65 *lock = NULL; 81 *lock = l; 87 hx509_lock_add_password(hx509_lock lock, const char *password) argument 96 d = realloc(lock->password.val, 97 (lock->password.len + 1) * sizeof(lock->password.val[0])); 102 lock->password.val = d; 103 lock->password.val[lock 110 _hx509_lock_get_passwords(hx509_lock lock) argument 116 _hx509_lock_unlock_certs(hx509_lock lock) argument 122 hx509_lock_reset_passwords(hx509_lock lock) argument 133 hx509_lock_add_cert(hx509_context context, hx509_lock lock, hx509_cert cert) argument 139 hx509_lock_add_certs(hx509_context context, hx509_lock lock, hx509_certs certs) argument 145 hx509_lock_reset_certs(hx509_context context, hx509_lock lock) argument 162 _hx509_lock_find_cert(hx509_lock lock, const hx509_query *q, hx509_cert *c) argument 169 hx509_lock_set_prompter(hx509_lock lock, hx509_prompter_fct prompt, void *data) argument 177 hx509_lock_reset_promper(hx509_lock lock) argument 207 hx509_lock_prompt(hx509_lock lock, hx509_prompt *prompt) argument 215 hx509_lock_free(hx509_lock lock) argument 240 hx509_lock_command_string(hx509_lock lock, const char *string) argument [all...] |
/freebsd-10.0-release/sbin/hastd/ |
H A D | synch.h | 49 mtx_init(pthread_mutex_t *lock) argument 53 error = pthread_mutex_init(lock, NULL); 57 mtx_destroy(pthread_mutex_t *lock) argument 61 error = pthread_mutex_destroy(lock); 65 mtx_lock(pthread_mutex_t *lock) argument 69 error = pthread_mutex_lock(lock); 73 mtx_trylock(pthread_mutex_t *lock) argument 77 error = pthread_mutex_trylock(lock); 82 mtx_unlock(pthread_mutex_t *lock) argument 86 error = pthread_mutex_unlock(lock); 90 mtx_owned(pthread_mutex_t *lock) argument 97 rw_init(pthread_rwlock_t *lock) argument 105 rw_destroy(pthread_rwlock_t *lock) argument 113 rw_rlock(pthread_rwlock_t *lock) argument 121 rw_wlock(pthread_rwlock_t *lock) argument 129 rw_unlock(pthread_rwlock_t *lock) argument 153 cv_wait(pthread_cond_t *cv, pthread_mutex_t *lock) argument 161 cv_timedwait(pthread_cond_t *cv, pthread_mutex_t *lock, int timeout) argument [all...] |
/freebsd-10.0-release/contrib/gcclibs/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...] |
/freebsd-10.0-release/sys/sys/ |
H A D | condvar.h | 55 void _cv_wait(struct cv *cvp, struct lock_object *lock); 56 void _cv_wait_unlock(struct cv *cvp, struct lock_object *lock); 57 int _cv_wait_sig(struct cv *cvp, struct lock_object *lock); 58 int _cv_timedwait_sbt(struct cv *cvp, struct lock_object *lock, 60 int _cv_timedwait_sig_sbt(struct cv *cvp, struct lock_object *lock, 66 #define cv_wait(cvp, lock) \ 67 _cv_wait((cvp), &(lock)->lock_object) 68 #define cv_wait_unlock(cvp, lock) \ 69 _cv_wait_unlock((cvp), &(lock)->lock_object) 70 #define cv_wait_sig(cvp, lock) \ [all...] |
H A D | lock.h | 42 * Lock classes. Each lock has a class which describes characteristics 46 * an error to perform any type of context switch while holding a spin lock. 47 * Also, for an individual lock to be recursable, its class must allow 48 * recursion and the lock itself must explicitly allow recursion. 51 * data for the 'show lock' DDB command. The 'lc_lock' and 53 * to lock and unlock locks while blocking on a sleep queue. The 61 void (*lc_assert)(const struct lock_object *lock, int what); 62 void (*lc_ddb_show)(const struct lock_object *lock); 63 void (*lc_lock)(struct lock_object *lock, uintptr_t how); 64 int (*lc_owner)(const struct lock_object *lock, [all...] |