/macosx-10.5.8/xnu-1228.15.4/osfmk/mach/i386/ |
H A D | flipc_dep.h | 53 * Flipc simple lock defines. These are almost completely for the use 60 * These locks may be declared by "flipc_simple_lock lock;". If they 74 #define flipc_simple_lock_init(lock) \ 76 *(lock) = SIMPLE_LOCK_INITIALIZER; \ 83 #define flipc_simple_lock_locked(lock) ((*lock) != SIMPLE_LOCK_INITIALIZER) 86 extern __inline__ int flipc_simple_lock_try(flipc_simple_lock *lock) argument 89 __asm__ volatile("movl $1, %0; xchgl %0, %1" : "=&r" (r), "=m" (*lock)); 94 extern __inline__ void flipc_simple_lock_release(flipc_simple_lock *lock) argument 98 __asm__ volatile("xorl %0, %0; xchgl %0, %1" : "=&r" (t), "=m" (*lock)); [all...] |
/macosx-10.5.8/xnu-1228.15.4/iokit/Kernel/ |
H A D | IOLocks.cpp | 49 void IOLockInitWithState( IOLock * lock, IOLockState state) argument 52 lck_mtx_lock( lock); 60 void IOLockFree( IOLock * lock) argument 62 lck_mtx_free( lock, IOLockGroup); 65 lck_mtx_t * IOLockGetMachLock( IOLock * lock) argument 67 return( (lck_mtx_t *)lock); 70 int IOLockSleep( IOLock * lock, void *event, UInt32 interType) argument 72 return (int) lck_mtx_sleep(lock, LCK_SLEEP_DEFAULT, (event_t) event, (wait_interrupt_t) interType); 75 int IOLockSleepDeadline( IOLock * lock, void *event, argument 78 return (int) lck_mtx_sleep_deadline(lock, LCK_SLEEP_DEFAUL 82 IOLockWakeup(IOLock * lock, void *event, bool oneThread) argument 97 _IORecursiveLock * lock; local 127 _IORecursiveLock * lock = (_IORecursiveLock *)_lock; local 140 _IORecursiveLock * lock = (_IORecursiveLock *)_lock; local 155 _IORecursiveLock * lock = (_IORecursiveLock *)_lock; local 174 _IORecursiveLock * lock = (_IORecursiveLock *)_lock; local 186 _IORecursiveLock * lock = (_IORecursiveLock *)_lock; local 193 _IORecursiveLock * lock = (_IORecursiveLock *)_lock; local 227 IORWLockFree( IORWLock * lock) argument 232 IORWLockGetMachLock( IORWLock * lock) argument 247 IOSimpleLockInit( IOSimpleLock * lock) argument 257 IOSimpleLockGetMachLock( IOSimpleLock * lock) argument [all...] |
/macosx-10.5.8/xnu-1228.15.4/iokit/IOKit/ |
H A D | IOLocks.h | 56 * Mutex lock operations 68 @discussion Allocates a mutex in general purpose memory, and initilizes it. Mutexes are general purpose blocking mutual exclusion locks, supplied by libkern/locks.h. This function may block and so should not be called from interrupt level or while a spin lock is held. 69 @result Pointer to the allocated lock, or zero on failure. */ 75 @discussion Frees a lock allocated with IOLockAlloc. Any blocked waiters will not be woken. 76 @param lock Pointer to the allocated lock. */ 78 void IOLockFree( IOLock * lock); 83 @param lock Pointer to the allocated lock. */ 85 lck_mtx_t * IOLockGetMachLock( IOLock * lock); 95 IOLockLock( IOLock * lock) argument 115 IOLockTryLock( IOLock * lock) argument 134 IOLockUnlock( IOLock * lock) argument 171 IOTakeLock( IOLock * lock) argument 172 IOTryLock( IOLock * lock) argument 173 IOUnlock( IOLock * lock) argument 278 IORWLockRead( IORWLock * lock) argument 297 IORWLockWrite( IORWLock * lock) argument 316 IORWLockUnlock( IORWLock * lock) argument 331 IOReadLock( IORWLock * lock) argument 332 IOWriteLock( IORWLock * lock) argument 333 IORWUnlock( IORWLock * lock) argument 456 IOSimpleLockUnlockEnableInterrupt( IOSimpleLock * lock, IOInterruptState state ) argument [all...] |
/macosx-10.5.8/xnu-1228.15.4/osfmk/mach/ |
H A D | flipc_locks.h | 57 * Separated the lock macros out into machine dependent and independent files; 82 /* Get the simple lock type. */ 86 * Lock function prototypes. This needs to be before any lock definitions 90 /* Initializes lock. Always a macro (so that kernel code can use it without 92 void flipc_simple_lock_init(flipc_simple_lock *lock); 94 /* Returns 1 if lock gained, 0 otherwise. */ 95 int flipc_simple_lock_try(flipc_simple_lock *lock); 97 /* Returns 1 if lock is locked, 0 otherwise. */ 98 int flipc_simple_lock_locked(flipc_simple_lock *lock); 100 /* Releases the lock [all...] |
/macosx-10.5.8/xnu-1228.15.4/osfmk/kern/ |
H A D | host.h | 72 #include <kern/lock.h> 80 decl_mutex_data(,lock) /* lock to protect exceptions */ 89 #define host_lock(host) mutex_lock(&(host)->lock) 90 #define host_unlock(host) mutex_unlock(&(host)->lock)
|
H A D | sync_lock.h | 36 * Contains RT distributed lock synchronization service definitions. 49 #include <kern/lock.h> 53 queue_chain_t held_link; /* ulocks held in the lock set */ 56 decl_mutex_data(,lock) /* ulock lock */ 58 struct lock_set *lock_set; /* the retaining lock set */ 59 thread_t holder; /* thread that holds the lock */ 73 queue_chain_t task_link; /* chain of lock sets owned by a task */ 74 decl_mutex_data(,lock) /* lock se [all...] |
H A D | ledger.h | 40 #include <kern/lock.h> 50 decl_simple_lock_data(,lock) 55 #define ledger_lock(ledger) simple_lock(&(ledger)->lock) 56 #define ledger_unlock(ledger) simple_unlock(&(ledger)->lock) 58 simple_lock_init(&(ledger)->lock, 0)
|
H A D | lock.h | 57 * File: kern/lock.h 70 #include <machine/lock.h> 139 lock_t *lock, 152 lock_t *lock); 155 lock_t *lock); 158 lock_t *lock); 161 lock_t *lock); 164 lock_t *lock); 170 lock_t *lock); 176 usimple_lock_t lock, [all...] |
H A D | kalloc.h | 80 #include <kern/lock.h> 89 simple_lock_t lock);
|
H A D | mk_timer.h | 46 decl_simple_lock_data(,lock)
|
H A D | mk_timer.c | 83 simple_lock_init(&timer->lock, 0); 109 simple_lock(&timer->lock); 121 simple_unlock(&timer->lock); 128 simple_unlock(&timer->lock); 150 simple_lock(&timer->lock); 154 simple_unlock(&timer->lock); 166 simple_unlock(&timer->lock); 177 simple_lock(&timer->lock); 181 simple_unlock(&timer->lock); 188 simple_unlock(&timer->lock); [all...] |
H A D | spl.c | 29 #include <kern/lock.h>
|
H A D | locks.c | 284 return panic("lck_grp_lckcnt_incr(): invalid lock type: %d\n", lck_type); 312 return panic("lck_grp_lckcnt_decr(): invalid lock type: %d\n", lck_type); 410 panic("Invalid lock sleep action %x\n", lck_sleep_action); 441 panic("Invalid lock sleep action %x\n", lck_sleep_action); 474 panic("Invalid lock sleep action %x\n", lck_sleep_action); 510 panic("Invalid lock sleep action %x\n", lck_sleep_action); 826 panic("Invalid lock sleep action %x\n", lck_sleep_action); 864 panic("Invalid lock sleep action %x\n", lck_sleep_action); 976 extern void lock_done_EXT(lck_rw_t *lock); 977 extern void lock_free_EXT(lck_rw_t *lock); 1013 lock_done_EXT( lck_rw_t *lock) argument 1020 lock_free_EXT( lck_rw_t *lock) argument 1027 lock_init_EXT( lck_rw_t *lock, __unused boolean_t can_sleep, __unused unsigned short tag0, __unused unsigned short tag1) argument 1037 lock_read_EXT( lck_rw_t *lock) argument 1044 lock_read_to_write_EXT( lck_rw_t *lock) argument 1051 lock_write_EXT( lck_rw_t *lock) argument 1058 lock_write_to_read_EXT( lck_rw_t *lock) argument 1065 thread_sleep_lock_write_EXT( event_t event, lck_rw_t *lock, wait_interrupt_t interruptible) argument 1136 usimple_lock_EXT( lck_spin_t *lock) argument 1143 usimple_lock_init_EXT( lck_spin_t *lock, __unused unsigned short tag) argument 1151 usimple_lock_try_EXT( lck_spin_t *lock) argument 1158 usimple_unlock_EXT( lck_spin_t *lock) argument 1165 thread_sleep_usimple_lock_EXT( event_t event, lck_spin_t *lock, wait_interrupt_t interruptible) argument [all...] |
H A D | affinity.h | 33 #include <kern/lock.h>
|
H A D | sync_sema.h | 48 #include <kern/lock.h> 53 struct wait_queue wait_queue; /* queue of blocked threads & lock */
|
H A D | task_swap.c | 40 #include <kern/lock.h>
|
H A D | processor.h | 77 #include <kern/lock.h> 92 decl_simple_lock_data(,sched_lock) /* lock for above */ 142 decl_simple_lock_data(,lock) 157 * Processor state is accessed by locking the scheduling lock 179 #define processor_lock(p) simple_lock(&(p)->lock) 180 #define processor_unlock(p) simple_unlock(&(p)->lock) 181 #define processor_lock_init(p) simple_lock_init(&(p)->lock, 0)
|
/macosx-10.5.8/xnu-1228.15.4/bsd/kern/ |
H A D | kern_lockf.c | 66 #include <sys/lock.h> 89 void lf_print(const char *tag, struct lockf *lock); 90 void lf_printlist(const char *tag, struct lockf *lock); 116 * Overlapping lock states 152 * lock operation to be attempted. 175 struct lockf *lock; local 189 LOCKF_DEBUG(0, "lf_advlock: '%s' unlock without lock\n", vfs_context_proc(context)->p_comm); 260 MALLOC(lock, struct lockf *, sizeof *lock, M_LOCKF, M_WAITOK); 261 if (lock 322 lf_coelesce_adjacent(struct lockf *lock) argument 389 lf_setlock(struct lockf *lock) argument 819 lf_getlock(struct lockf *lock, struct flock *fl) argument 863 lf_getblock(struct lockf *lock) argument 930 lf_findoverlap(struct lockf *lf, struct lockf *lock, int type, struct lockf ***prev, struct lockf **overlap) argument 1143 lf_print(const char *tag, struct lockf *lock) argument 1183 lf_printlist(const char *tag, struct lockf *lock) argument [all...] |
H A D | pthread_support.c | 62 #include <sys/lock.h> 89 MTX_LOCK(mtx->lock); 91 MTX_UNLOCK(mtx->lock); 132 MTX_LOCK(mutex->lock); 134 MTX_UNLOCK(mutex->lock); 148 COND_LOCK(cond->lock); 150 COND_UNLOCK(cond->lock); 191 COND_LOCK(cond->lock); 193 COND_UNLOCK(cond->lock);
|
/macosx-10.5.8/xnu-1228.15.4/osfmk/i386/commpage/ |
H A D | atomic.s | 58 lock 80 lock 101 lock 122 lock 144 lock 163 lock 198 lock // always lock for now... 225 lock // always lock fo [all...] |
/macosx-10.5.8/xnu-1228.15.4/libsyscall/custom/ |
H A D | __vfork.s | 113 lock 121 lock 134 lock 154 lock 162 lock 175 lock
|
/macosx-10.5.8/xnu-1228.15.4/iokit/IOKit/i386/ |
H A D | IOSharedLockImp.h | 63 * Lock the lock pointed to by p. Spin (possibly forever) until the next 64 * lock is available. 76 lock 88 * Unlock the lock pointed to by p. 104 * Try to lock p. Return zero if not successful. 111 lock
|
/macosx-10.5.8/xnu-1228.15.4/osfmk/machine/ |
H A D | Makefile | 15 lock.h \
|
/macosx-10.5.8/xnu-1228.15.4/osfmk/ppc/ |
H A D | hw_lock.s | 99 * Initialize a hardware lock. 106 li r0, 0 ; set lock to free == 0 107 stw r0, 0(r3) ; Initialize the lock 113 * Try to acquire spin-lock. The second parameter is the bit mask to test and set. 130 * Acquire lock, spinning until it becomes available. 132 * We will just set a default timeout and jump into the NORMAL timeout lock. 152 * Try to acquire spin-lock. Return success (1) or failure (0). 154 * We try fairly hard to get this lock. We disable for interruptions, but 158 * we return either in abject failure, or disable and go back to the lock sniff routine. 159 * If the sniffer finds the lock fre [all...] |
/macosx-10.5.8/xnu-1228.15.4/osfmk/i386/ |
H A D | fpu.c | 269 simple_lock(&pcb->lock); 274 simple_unlock(&pcb->lock); 284 simple_lock(&pcb->lock); 289 simple_unlock(&pcb->lock); 318 simple_unlock(&pcb->lock); 350 simple_lock(&pcb->lock); 360 simple_unlock(&pcb->lock); 384 simple_unlock(&pcb->lock); 395 * outside agency -> no need for pcb lock 417 simple_lock(&ppcb->lock); [all...] |