Searched refs:lock (Results 1 - 25 of 1904) sorted by relevance

1234567891011>>

/freebsd-9.3-release/sys/gnu/fs/xfs/FreeBSD/support/
H A Drwlock.h5 #include <sys/lock.h>
12 #define rwlock_init(lock) sx_init(lock, "rwlock")
13 #define rwlock_destroy(lock) sx_destroy(lock)
14 #define read_lock(lock) sx_slock(lock)
15 #define read_unlock(lock) sx_sunlock(lock)
16 #define write_lock(lock) sx_xloc
[all...]
H A Dmutex.h5 #include <sys/lock.h>
18 #define mutex_init(lock, type, name) sx_init(lock, name)
19 #define mutex_lock(lock, num) sx_xlock(lock)
20 #define mutex_trylock(lock) sx_try_xlock(lock)
21 #define mutex_unlock(lock) sx_xunlock(lock)
22 #define mutex_destroy(lock) sx_destro
[all...]
H A Dspin.h6 #include <sys/lock.h>
14 #define spinlock_init(lock, name) mtx_init(lock, name, NULL, MTX_DEF)
15 #define spinlock_destroy(lock) mtx_destroy(lock)
22 #define nested_spinunlock(lock) mtx_unlock(lock)
23 #define nested_spinlock(lock) mtx_lock(lock)
24 #define nested_spintrylock(lock) mtx_tryloc
33 mutex_spinlock(lock_t *lock) argument
[all...]
H A Dmrlock.h6 #include <sys/lock.h>
25 #define mrlock_init(lock, type, name, seq) sx_init(lock, name)
26 #define mrtryaccess(lock) sx_try_slock(lock)
27 #define mrtryupdate(lock) sx_try_xlock(lock)
28 #define mraccess(lock) sx_slock(lock)
29 #define mrupdate(lock) sx_xloc
[all...]
/freebsd-9.3-release/sys/contrib/octeon-sdk/
H A Dcvmx-rwlock.h67 /* 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:__anon6602
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 Dcvmx-spinlock.h89 * @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-9.3-release/contrib/gcclibs/libgomp/config/posix95/
H A Dlock.c38 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-9.3-release/sys/ofed/include/linux/
H A Drwlock.h31 #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 Dspinlock.h33 #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 Dlockdep.h35 #define lockdep_set_class(lock, key)
/freebsd-9.3-release/sys/dev/drm2/ttm/
H A Dttm_lock.c50 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 Dttm_lock.h34 * 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-9.3-release/contrib/gcclibs/libgomp/config/posix/
H A Dlock.c47 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 Domp-lock.h11 typedef struct { pthread_mutex_t lock; int count; } omp_nest_lock_t; member in struct:__anon1290
/freebsd-9.3-release/lib/libc/iconv/
H A Dcitrus_lock.h30 static pthread_rwlock_t lock; variable
33 pthread_rwlock_wrlock(&lock);
35 pthread_rwlock_unlock(&lock);
/freebsd-9.3-release/sys/cddl/compat/opensolaris/sys/
H A Drwlock.h34 #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 Dmutex.h35 #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-9.3-release/tools/KSE/ksetest/
H A Dsimplelock.h40 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-9.3-release/tools/KSE/rr/
H A Dsimplelock.h40 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-9.3-release/contrib/gcclibs/libgomp/config/linux/
H A Dlock.c43 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-9.3-release/sys/dev/drm/
H A Ddrm_lock.c36 * 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-9.3-release/sys/dev/drm2/
H A Ddrm_lock.c36 * 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-9.3-release/crypto/heimdal/lib/hx509/
H A Dlock.c35 RCSID("$Id: lock.c 22327 2007-12-15 04:49:37Z lha $");
61 hx509_lock_init(hx509_context context, hx509_lock *lock) argument
66 *lock = NULL;
82 *lock = l;
88 hx509_lock_add_password(hx509_lock lock, const char *password) argument
97 d = realloc(lock->password.val,
98 (lock->password.len + 1) * sizeof(lock->password.val[0]));
103 lock->password.val = d;
104 lock
111 _hx509_lock_get_passwords(hx509_lock lock) argument
117 _hx509_lock_unlock_certs(hx509_lock lock) argument
123 hx509_lock_reset_passwords(hx509_lock lock) argument
134 hx509_lock_add_cert(hx509_context context, hx509_lock lock, hx509_cert cert) argument
140 hx509_lock_add_certs(hx509_context context, hx509_lock lock, hx509_certs certs) argument
146 hx509_lock_reset_certs(hx509_context context, hx509_lock lock) argument
163 _hx509_lock_find_cert(hx509_lock lock, const hx509_query *q, hx509_cert *c) argument
170 hx509_lock_set_prompter(hx509_lock lock, hx509_prompter_fct prompt, void *data) argument
178 hx509_lock_reset_promper(hx509_lock lock) argument
208 hx509_lock_prompt(hx509_lock lock, hx509_prompt *prompt) argument
216 hx509_lock_free(hx509_lock lock) argument
239 hx509_lock_command_string(hx509_lock lock, const char *string) argument
[all...]
/freebsd-9.3-release/contrib/ntp/sntp/libevent/
H A Devthread.c94 event_warnx("Trying to disable lock functions after "
105 target->lock == cbs->lock &&
110 event_warnx("Can't change lock callbacks once they have been "
114 if (cbs->alloc && cbs->free && cbs->lock && cbs->unlock) {
168 * lock to protect count. */
170 void *lock; member in struct:debug_lock
180 if (!(result->lock = original_lock_fns_.alloc(
186 result->lock = NULL;
198 struct debug_lock *lock local
213 evthread_debug_lock_mark_locked(unsigned mode, struct debug_lock *lock) argument
231 struct debug_lock *lock = lock_; local
246 evthread_debug_lock_mark_unlocked(unsigned mode, struct debug_lock *lock) argument
267 struct debug_lock *lock = lock_; local
279 struct debug_lock *lock = lock_; local
326 struct debug_lock *lock = lock_; local
340 struct debug_lock *lock = lock_; local
359 struct debug_lock *lock; local
383 struct debug_lock *lock = lock_; local
413 evthreadimpl_lock_free_(void *lock, unsigned locktype) argument
419 evthreadimpl_lock_lock_(unsigned mode, void *lock) argument
427 evthreadimpl_lock_unlock_(unsigned mode, void *lock) argument
455 evthreadimpl_cond_wait_(void *cond, void *lock, const struct timeval *tv) argument
[all...]
/freebsd-9.3-release/sbin/hastd/
H A Dsynch.h49 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...]

Completed in 124 milliseconds

1234567891011>>