/haiku-fatelf/src/system/libroot/os/locks/ |
H A D | recursive_lock.cpp | 17 // #pragma mark - recursive lock 21 recursive_lock_get_recursion(recursive_lock *lock) argument 23 if (lock->holder == find_thread(NULL)) 24 return lock->recursion; 31 recursive_lock_init(recursive_lock *lock, const char *name) argument 33 recursive_lock_init_etc(lock, name, 0); 38 recursive_lock_init_etc(recursive_lock *lock, const char *name, uint32 flags) argument 40 lock->holder = -1; 41 lock->recursion = 0; 42 mutex_init_etc(&lock 47 recursive_lock_destroy(recursive_lock *lock) argument 57 recursive_lock_lock(recursive_lock *lock) argument 72 recursive_lock_unlock(recursive_lock *lock) argument [all...] |
H A D | rw_lock.cpp | 23 rw_lock_wait(rw_lock *lock, bool writer) argument 30 if (lock->waiters != NULL) 31 lock->last_waiter->next = &waiter; 33 lock->waiters = &waiter; 35 lock->last_waiter = &waiter; 39 mutex_unlock(&lock->lock); 46 // and lock it again before returning 47 mutex_lock(&lock->lock); 53 rw_lock_unblock(rw_lock *lock) argument 83 rw_lock_init(rw_lock *lock, const char *name) argument 90 rw_lock_init_etc(rw_lock *lock, const char *name, uint32 flags) argument 102 rw_lock_destroy(rw_lock *lock) argument 117 rw_lock_read_lock(rw_lock *lock) argument 136 rw_lock_read_unlock(rw_lock *lock) argument 164 rw_lock_write_lock(rw_lock *lock) argument 197 rw_lock_write_unlock(rw_lock *lock) argument [all...] |
H A D | mutex.cpp | 25 mutex_init(mutex *lock, const char *name) argument 27 lock->name = name; 28 lock->lock = 0; 29 lock->flags = 0; 34 mutex_init_etc(mutex *lock, const char *name, uint32 flags) argument 36 lock->name = (flags & MUTEX_FLAG_CLONE_NAME) != 0 ? strdup(name) : name; 37 lock->lock = 0; 38 lock 43 mutex_destroy(mutex *lock) argument 51 mutex_lock(mutex *lock) argument 74 mutex_unlock(mutex *lock) argument [all...] |
/haiku-fatelf/src/add-ons/kernel/bus_managers/scsi/ |
H A D | scsi_lock.h | 22 // enhanced spinlock that automatically disables irqs when lock is hold 24 spinlock lock; // normal spinlock member in struct:spinlock_irq 30 spinlock_irq_init(spinlock_irq *lock) argument 32 B_INITIALIZE_SPINLOCK(&lock->lock); 36 acquire_spinlock_irq(spinlock_irq *lock) argument 40 acquire_spinlock(&lock->lock); 41 lock->prev_irq_state = prev_irq_state; 45 release_spinlock_irq(spinlock_irq *lock) argument [all...] |
/haiku-fatelf/headers/private/graphics/intel_extreme/ |
H A D | lock.h | 15 typedef struct lock { struct 18 } lock; typedef in typeref:struct:lock 22 init_lock(struct lock *lock, const char *name) argument 24 lock->sem = create_sem(0, name); 25 lock->count = 0; 27 return lock->sem < B_OK ? lock->sem : B_OK; 32 uninit_lock(struct lock *lock) argument 39 acquire_lock(struct lock *lock) argument 49 release_lock(struct lock *lock) argument 60 Autolock(struct lock &lock) argument [all...] |
/haiku-fatelf/headers/private/graphics/radeon_hd/ |
H A D | lock.h | 15 typedef struct lock { struct 18 } lock; typedef in typeref:struct:lock 22 init_lock(struct lock *lock, const char *name) argument 24 lock->sem = create_sem(0, name); 25 lock->count = 0; 27 return lock->sem < B_OK ? lock->sem : B_OK; 32 uninit_lock(struct lock *lock) argument 39 acquire_lock(struct lock *lock) argument 49 release_lock(struct lock *lock) argument 60 Autolock(struct lock &lock) argument [all...] |
/haiku-fatelf/src/libs/posix_error_mapper/ |
H A D | pthread_spinlock.cpp | 12 (pthread_spinlock_t* lock, int pshared), 13 return B_TO_POSITIVE_ERROR(sReal_pthread_spin_init(lock, pshared)); 17 WRAPPER_FUNCTION(int, pthread_spin_destroy, (pthread_spinlock_t* lock), 18 return B_TO_POSITIVE_ERROR(sReal_pthread_spin_destroy(lock)); 22 WRAPPER_FUNCTION(int, pthread_spin_lock, (pthread_spinlock_t* lock), 23 return B_TO_POSITIVE_ERROR(sReal_pthread_spin_lock(lock)); 27 WRAPPER_FUNCTION(int, pthread_spin_trylock, (pthread_spinlock_t* lock), 28 return B_TO_POSITIVE_ERROR(sReal_pthread_spin_trylock(lock)); 32 WRAPPER_FUNCTION(int, pthread_spin_unlock, (pthread_spinlock_t* lock), 33 return B_TO_POSITIVE_ERROR(sReal_pthread_spin_unlock(lock)); [all...] |
H A D | pthread_rwlock.cpp | 12 (pthread_rwlock_t *lock, const pthread_rwlockattr_t *attr), 13 return B_TO_POSITIVE_ERROR(sReal_pthread_rwlock_init(lock, attr)); 17 WRAPPER_FUNCTION(int, pthread_rwlock_destroy, (pthread_rwlock_t *lock), 18 return B_TO_POSITIVE_ERROR(sReal_pthread_rwlock_destroy(lock)); 22 WRAPPER_FUNCTION(int, pthread_rwlock_rdlock, (pthread_rwlock_t *lock), 23 return B_TO_POSITIVE_ERROR(sReal_pthread_rwlock_rdlock(lock)); 27 WRAPPER_FUNCTION(int, pthread_rwlock_tryrdlock, (pthread_rwlock_t *lock), 28 return B_TO_POSITIVE_ERROR(sReal_pthread_rwlock_tryrdlock(lock)); 33 (pthread_rwlock_t *lock, const struct timespec *timeout), 34 return B_TO_POSITIVE_ERROR(sReal_pthread_rwlock_timedrdlock(lock, timeou [all...] |
/haiku-fatelf/src/system/libroot/posix/pthread/ |
H A D | pthread_spinlock.c | 19 pthread_spin_init(pthread_spinlock_t* lock, int pshared) argument 25 lock->lock = UNLOCKED; 31 pthread_spin_destroy(pthread_spinlock_t* lock) argument 38 pthread_spin_lock(pthread_spinlock_t* lock) argument 40 while (atomic_test_and_set((int32*)&lock->lock, LOCKED, UNLOCKED) 50 pthread_spin_trylock(pthread_spinlock_t* lock) argument 52 if (atomic_test_and_set((int32*)&lock->lock, LOCKE 59 pthread_spin_unlock(pthread_spinlock_t* lock) argument [all...] |
/haiku-fatelf/src/bin/coreutils/lib/glthread/ |
H A D | lock.c | 27 #include "glthread/lock.h" 42 glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) argument 46 err = pthread_rwlock_init (&lock->rwlock, NULL); 49 lock->initialized = 1; 54 glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) argument 56 if (!lock->initialized) 60 err = pthread_mutex_lock (&lock->guard); 63 if (!lock->initialized) 65 err = glthread_rwlock_init_multithreaded (lock); 68 pthread_mutex_unlock (&lock 80 glthread_rwlock_wrlock_multithreaded(gl_rwlock_t *lock) argument 106 glthread_rwlock_unlock_multithreaded(gl_rwlock_t *lock) argument 114 glthread_rwlock_destroy_multithreaded(gl_rwlock_t *lock) argument 132 glthread_rwlock_init_multithreaded(gl_rwlock_t *lock) argument 151 glthread_rwlock_rdlock_multithreaded(gl_rwlock_t *lock) argument 180 glthread_rwlock_wrlock_multithreaded(gl_rwlock_t *lock) argument 207 glthread_rwlock_unlock_multithreaded(gl_rwlock_t *lock) argument 263 glthread_rwlock_destroy_multithreaded(gl_rwlock_t *lock) argument 288 glthread_recursive_lock_init_multithreaded(gl_recursive_lock_t *lock) argument 317 glthread_recursive_lock_init_multithreaded(gl_recursive_lock_t *lock) argument 345 glthread_recursive_lock_lock_multithreaded(gl_recursive_lock_t *lock) argument 371 glthread_recursive_lock_unlock_multithreaded(gl_recursive_lock_t *lock) argument 379 glthread_recursive_lock_destroy_multithreaded(gl_recursive_lock_t *lock) argument 397 glthread_recursive_lock_init_multithreaded(gl_recursive_lock_t *lock) argument 410 glthread_recursive_lock_lock_multithreaded(gl_recursive_lock_t *lock) argument 431 glthread_recursive_lock_unlock_multithreaded(gl_recursive_lock_t *lock) argument 447 glthread_recursive_lock_destroy_multithreaded(gl_recursive_lock_t *lock) argument 536 glthread_recursive_lock_init_multithreaded(gl_recursive_lock_t *lock) argument 549 glthread_recursive_lock_lock_multithreaded(gl_recursive_lock_t *lock) argument 570 glthread_recursive_lock_unlock_multithreaded(gl_recursive_lock_t *lock) argument 586 glthread_recursive_lock_destroy_multithreaded(gl_recursive_lock_t *lock) argument 641 glthread_lock_init_func(gl_lock_t *lock) argument 648 glthread_lock_lock_func(gl_lock_t *lock) argument 666 glthread_lock_unlock_func(gl_lock_t *lock) argument 675 glthread_lock_destroy_func(gl_lock_t *lock) argument 778 glthread_rwlock_init_func(gl_rwlock_t *lock) argument 788 glthread_rwlock_rdlock_func(gl_rwlock_t *lock) argument 842 glthread_rwlock_wrlock_func(gl_rwlock_t *lock) argument 895 glthread_rwlock_unlock_func(gl_rwlock_t *lock) argument 939 glthread_rwlock_destroy_func(gl_rwlock_t *lock) argument 957 glthread_recursive_lock_init_func(gl_recursive_lock_t *lock) argument 966 glthread_recursive_lock_lock_func(gl_recursive_lock_t *lock) argument 996 glthread_recursive_lock_unlock_func(gl_recursive_lock_t *lock) argument 1011 glthread_recursive_lock_destroy_func(gl_recursive_lock_t *lock) argument [all...] |
/haiku-fatelf/src/system/kernel/locks/ |
H A D | lock.cpp | 14 #include <lock.h> 50 recursive_lock_get_recursion(recursive_lock *lock) argument 52 if (RECURSIVE_LOCK_HOLDER(lock) == thread_get_current_thread_id()) 53 return lock->recursion; 60 recursive_lock_init(recursive_lock *lock, const char *name) argument 62 mutex_init(&lock->lock, name != NULL ? name : "recursive lock"); 63 RECURSIVE_LOCK_HOLDER(lock) = -1; 64 lock 69 recursive_lock_init_etc(recursive_lock *lock, const char *name, uint32 flags) argument 78 recursive_lock_destroy(recursive_lock *lock) argument 88 recursive_lock_lock(recursive_lock *lock) argument 110 recursive_lock_trylock(recursive_lock *lock) argument 134 recursive_lock_unlock(recursive_lock *lock) argument 152 rw_lock_wait(rw_lock* lock, bool writer) argument 174 rw_lock_unblock(rw_lock* lock) argument 223 rw_lock_init(rw_lock* lock, const char* name) argument 240 rw_lock_init_etc(rw_lock* lock, const char* name, uint32 flags) argument 257 rw_lock_destroy(rw_lock* lock) argument 297 _rw_lock_read_lock(rw_lock* lock) argument 328 _rw_lock_read_lock_with_timeout(rw_lock* lock, uint32 timeoutFlags, bigtime_t timeout) argument 410 _rw_lock_read_unlock(rw_lock* lock, bool schedulerLocked) argument 438 rw_lock_write_lock(rw_lock* lock) argument 476 _rw_lock_write_unlock(rw_lock* lock, bool schedulerLocked) argument 529 rw_lock* lock = (rw_lock*)parse_expression(argv[1]); local 561 mutex_init(mutex* lock, const char *name) argument 579 mutex_init_etc(mutex* lock, const char *name, uint32 flags) argument 597 mutex_destroy(mutex* lock) argument 663 _mutex_lock(mutex* lock, bool schedulerLocked) argument 719 _mutex_unlock(mutex* lock, bool schedulerLocked) argument 768 _mutex_trylock(mutex* lock) argument 783 _mutex_lock_with_timeout(mutex* lock, uint32 timeoutFlags, bigtime_t timeout) argument 881 mutex* lock = (mutex*)parse_expression(argv[1]); local [all...] |
/haiku-fatelf/src/tools/fs_shell/ |
H A D | lock.cpp | 20 fssh_recursive_lock_get_recursion(fssh_recursive_lock *lock) argument 22 if (lock->holder == fssh_find_thread(NULL)) 23 return lock->recursion; 30 fssh_recursive_lock_init(fssh_recursive_lock *lock, const char *name) argument 32 if (lock == NULL) 36 name = "recursive lock"; 38 lock->holder = -1; 39 lock->recursion = 0; 40 lock->sem = fssh_create_sem(1, name); 41 if (lock 47 fssh_recursive_lock_destroy(fssh_recursive_lock *lock) argument 58 fssh_recursive_lock_lock(fssh_recursive_lock *lock) argument 75 fssh_recursive_lock_trylock(fssh_recursive_lock *lock) argument 93 fssh_recursive_lock_unlock(fssh_recursive_lock *lock) argument 106 fssh_recursive_lock_transfer_lock(fssh_recursive_lock *lock, fssh_thread_id thread) argument 201 fssh_rw_lock_init(fssh_rw_lock *lock, const char *name) argument 219 fssh_rw_lock_init_etc(fssh_rw_lock *lock, const char *name, uint32_t flags) argument 226 fssh_rw_lock_destroy(fssh_rw_lock *lock) argument 236 fssh_rw_lock_read_lock(fssh_rw_lock *lock) argument 248 fssh_rw_lock_read_unlock(fssh_rw_lock *lock) argument 258 fssh_rw_lock_write_lock(fssh_rw_lock *lock) argument 276 fssh_rw_lock_write_unlock(fssh_rw_lock *lock) argument [all...] |
/haiku-fatelf/src/tests/add-ons/kernel/kernelland_emu/ |
H A D | lock.cpp | 10 #include <lock.h> 97 recursive_lock_get_recursion(recursive_lock *lock) argument 99 if (RECURSIVE_LOCK_HOLDER(lock) == find_thread(NULL)) 100 return lock->recursion; 107 recursive_lock_init(recursive_lock *lock, const char *name) argument 109 mutex_init(&lock->lock, name != NULL ? name : "recursive lock"); 110 RECURSIVE_LOCK_HOLDER(lock) = -1; 111 lock 116 recursive_lock_init_etc(recursive_lock *lock, const char *name, uint32 flags) argument 125 recursive_lock_destroy(recursive_lock *lock) argument 135 recursive_lock_lock(recursive_lock *lock) argument 152 recursive_lock_trylock(recursive_lock *lock) argument 172 recursive_lock_unlock(recursive_lock *lock) argument 190 rw_lock_wait(rw_lock* lock, bool writer) argument 219 rw_lock_unblock(rw_lock* lock) argument 268 rw_lock_init(rw_lock* lock, const char* name) argument 282 rw_lock_init_etc(rw_lock* lock, const char* name, uint32 flags) argument 296 rw_lock_destroy(rw_lock* lock) argument 336 _rw_lock_read_lock(rw_lock* lock) argument 365 _rw_lock_read_lock_with_timeout(rw_lock* lock, uint32 timeoutFlags, bigtime_t timeout) argument 455 _rw_lock_read_unlock(rw_lock* lock, bool threadsLocked) argument 482 rw_lock_write_lock(rw_lock* lock) argument 520 _rw_lock_write_unlock(rw_lock* lock, bool threadsLocked) argument 567 mutex_init(mutex* lock, const char *name) argument 581 mutex_init_etc(mutex* lock, const char *name, uint32 flags) argument 595 mutex_destroy(mutex* lock) argument 661 _mutex_lock(mutex* lock, bool threadsLocked) argument 716 _mutex_unlock(mutex* lock, bool threadsLocked) argument 760 _mutex_trylock(mutex* lock) argument [all...] |
/haiku-fatelf/headers/private/shared/ |
H A D | locks.h | 16 int32 lock; member in struct:mutex 23 void mutex_init(mutex *lock, const char *name); 24 void mutex_init_etc(mutex *lock, const char *name, uint32 flags); 25 void mutex_destroy(mutex *lock); 26 status_t mutex_lock(mutex *lock); 27 void mutex_unlock(mutex *lock); 31 mutex lock; member in struct:rw_lock 44 void rw_lock_init(rw_lock *lock, const char *name); 45 void rw_lock_init_etc(rw_lock *lock, const char *name, uint32 flags); 46 void rw_lock_destroy(rw_lock *lock); 54 mutex lock; member in struct:recursive_lock 85 Lock(struct mutex *lock) argument 90 Unlock(struct mutex *lock) argument 99 Lock(struct rw_lock *lock) argument 104 Unlock(struct rw_lock *lock) argument 113 Lock(struct rw_lock *lock) argument 118 Unlock(struct rw_lock *lock) argument [all...] |
/haiku-fatelf/src/add-ons/kernel/drivers/network/usb_ecm/ |
H A D | BeOSCompatibility.h | 28 mutex_init(mutex *lock, const char *name) argument 30 lock->sem = create_sem(0, name); 31 lock->count = 0; 36 mutex_destroy(mutex *lock) argument 38 delete_sem(lock->sem); 43 mutex_lock(mutex *lock) argument 45 if (atomic_add(&lock->count, -1) < 0) 46 return acquire_sem(lock->sem); 52 mutex_unlock(mutex *lock) argument 54 if (atomic_add(&lock [all...] |
/haiku-fatelf/headers/private/kernel/ |
H A D | lock.h | 34 mutex lock; member in struct:recursive_lock 71 { ASSERT(find_thread(NULL) == (r)->lock.holder); } 102 # define RECURSIVE_LOCK_HOLDER(recursiveLock) ((recursiveLock)->lock.holder) 112 extern void recursive_lock_init(recursive_lock *lock, const char *name); 114 extern void recursive_lock_init_etc(recursive_lock *lock, const char *name, 116 extern void recursive_lock_destroy(recursive_lock *lock); 117 extern status_t recursive_lock_lock(recursive_lock *lock); 118 extern status_t recursive_lock_trylock(recursive_lock *lock); 119 extern void recursive_lock_unlock(recursive_lock *lock); 120 extern int32 recursive_lock_get_recursion(recursive_lock *lock); 158 rw_lock_read_lock(rw_lock* lock) argument 172 rw_lock_read_lock_with_timeout(rw_lock* lock, uint32 timeoutFlags, bigtime_t timeout) argument 187 rw_lock_read_unlock(rw_lock* lock) argument 200 rw_lock_write_unlock(rw_lock* lock) argument 207 mutex_lock(mutex* lock) argument 220 mutex_lock_threads_locked(mutex* lock) argument 233 mutex_trylock(mutex* lock) argument 246 mutex_lock_with_timeout(mutex* lock, uint32 timeoutFlags, bigtime_t timeout) argument 259 mutex_unlock(mutex* lock) argument 269 mutex_transfer_lock(mutex* lock, thread_id thread) argument 278 recursive_lock_transfer_lock(recursive_lock* lock, thread_id thread) argument [all...] |
H A D | smp.h | 44 bool try_acquire_spinlock(spinlock* lock); 78 try_acquire_spinlock_inline(spinlock* lock) argument 80 return atomic_or((int32*)lock, 1) == 0; 85 acquire_spinlock_inline(spinlock* lock) argument 87 if (try_acquire_spinlock_inline(lock)) 89 acquire_spinlock(lock); 94 release_spinlock_inline(spinlock* lock) argument 96 atomic_and((int32*)lock, 0); 100 #define try_acquire_spinlock(lock) try_acquire_spinlock_inline(lock) [all...] |
/haiku-fatelf/src/add-ons/kernel/file_systems/ntfs/ |
H A D | lock.h | 6 #include <lock.h> 8 typedef recursive_lock lock; typedef
|
/haiku-fatelf/src/libs/compat/freebsd_network/compat/sys/ |
H A D | _mutex.h | 10 #include <lock.h> 17 mutex lock; member in struct:mtx::__anon4691::__anon4692
|
/haiku-fatelf/src/system/libroot/posix/malloc/ |
H A D | arch-specific.h | 37 void hoardLockInit(hoardLockType &lock, const char *name); 38 void hoardLock(hoardLockType &lock); 39 void hoardUnlock(hoardLockType &lock);
|
/haiku-fatelf/src/add-ons/kernel/file_systems/googlefs/ |
H A D | lock.h | 13 typedef struct lock lock; typedef in typeref:struct:lock 16 struct lock { struct 25 extern _IMPEXP_KERNEL int new_lock(lock *l, const char *name); 26 extern _IMPEXP_KERNEL int free_lock(lock *l); 28 static inline status_t LOCK(lock *l) 35 static inline status_t UNLOCK(lock *l)
|
/haiku-fatelf/src/tests/system/kernel/ |
H A D | spinlock_contention.cpp | 23 vint32 lock; member in struct:dummy_spinlock 50 dummy_acquire_spinlock_nocheck(dummy_spinlock* lock) argument 54 panic("acquire_spinlock_nocheck: attempt to acquire lock %p with interrupts enabled\n", lock); 56 while (atomic_add(&lock->lock, 1) != 0) { 60 panic("acquire_spinlock_nocheck: attempt to acquire lock %p with interrupts enabled\n", lock); 61 if (atomic_set((int32 *)lock, 1) != 0) 62 panic("acquire_spinlock_nocheck: attempt to acquire lock 68 dummy_release_spinlock(dummy_spinlock* lock) argument 153 test_spinlock(dummy_spinlock* lock) argument 168 dummy_spinlock lock; local [all...] |
/haiku-fatelf/src/kits/tracker/ |
H A D | FilePanel.cpp | 113 AutoLock<BWindow> lock(fWindow); 114 if (!lock) 135 AutoLock<BWindow> lock(fWindow); 136 if (!lock) 147 AutoLock<BWindow> lock(fWindow); 148 if (!lock) 165 AutoLock<BWindow> lock(fWindow); 166 if (!lock) 181 AutoLock<BWindow> lock(fWindow); 182 if (!lock) [all...] |
/haiku-fatelf/headers/private/tracker/ |
H A D | AutoLock.h | 43 // destructor unlock for you whenever the lock goes out of scope 46 AutoLock(T *lock, bool lockNow = true) argument 48 : fLock(lock), 55 AutoLock(T &lock, bool lockNow = true) argument 56 : fLock(&lock), 76 // for unlocking before lock goes out of scope and successive
|
/haiku-fatelf/src/add-ons/translators/exr/openexr/ilmthread/ |
H A D | IlmThreadMutex.cpp | 53 void Mutex::lock () const {} function in class:IlmThread::Mutex
|