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

1234567891011>>

/macosx-10.10.1/ksh-23/ksh/src/lib/libast/astsa/
H A Daso.c27 asolock(unsigned int volatile* lock, unsigned int key, int type) argument
35 if (*lock != 0)
37 if (*lock != key)
39 *lock = 0;
43 if (*lock != key)
45 if (*lock != 0)
47 *lock = key;
52 *lock = key;
/macosx-10.10.1/xnu-2782.1.97/osfmk/mach/i386/
H A Dflipc_dep.h53 * 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.10.1/xnu-2782.1.97/iokit/Kernel/
H A DIOLocks.cpp45 void IOLockInitWithState( IOLock * lock, IOLockState state) argument
48 lck_mtx_lock( lock);
56 void IOLockFree( IOLock * lock) argument
58 lck_mtx_free( lock, IOLockGroup);
61 lck_mtx_t * IOLockGetMachLock( IOLock * lock) argument
63 return( (lck_mtx_t *)lock);
66 int IOLockSleep( IOLock * lock, void *event, UInt32 interType) argument
68 return (int) lck_mtx_sleep(lock, LCK_SLEEP_PROMOTED_PRI, (event_t) event, (wait_interrupt_t) interType);
71 int IOLockSleepDeadline( IOLock * lock, void *event, argument
74 return (int) lck_mtx_sleep_deadline(lock, LCK_SLEEP_PROMOTED_PR
78 IOLockWakeup(IOLock * lock, void *event, bool oneThread) argument
93 IOLockSleep_legacy_x86_64( IOLock * lock, void *event, UInt32 interType) argument
101 IOLockSleepDeadline_legacy_x86_64( IOLock * lock, void *event, AbsoluteTime deadline, UInt32 interType) argument
110 IOLockWakeup_legacy_x86_64(IOLock * lock, void *event, bool oneThread) argument
129 _IORecursiveLock * lock; local
159 _IORecursiveLock * lock = (_IORecursiveLock *)_lock; local
172 _IORecursiveLock * lock = (_IORecursiveLock *)_lock; local
187 _IORecursiveLock * lock = (_IORecursiveLock *)_lock; local
206 _IORecursiveLock * lock = (_IORecursiveLock *)_lock; local
218 _IORecursiveLock * lock = (_IORecursiveLock *)_lock; local
225 _IORecursiveLock * lock = (_IORecursiveLock *)_lock; local
247 _IORecursiveLock * lock = (_IORecursiveLock *)_lock; local
281 IORWLockFree( IORWLock * lock) argument
286 IORWLockGetMachLock( IORWLock * lock) argument
301 IOSimpleLockInit( IOSimpleLock * lock) argument
311 IOSimpleLockGetMachLock( IOSimpleLock * lock) argument
[all...]
/macosx-10.10.1/ksh-23/ksh/src/lib/libast/aso/
H A Dasolock.c33 asolock(unsigned int volatile* lock, unsigned int key, int type)
41 return *lock == 0 ? 0 : asocasint(lock, key, 0) == key ? 0 : -1;
43 return *lock == key ? 0 : asocasint(lock, 0, key) == 0 ? 0 : -1;
45 if (*lock == key)
49 for (k = 0; asocasint(lock, 0, key) != 0; ASOLOOP(k));
H A Daso-fcntl.c55 struct flock lock;
61 lock.l_type = F_WRLCK;
62 lock.l_whence = SEEK_SET;
63 lock.l_start = apl->size;
64 lock.l_len = sizeof(references);
65 if (fcntl(apl->fd, F_SETLKW, &lock) >= 0)
79 lock.l_type = F_UNLCK;
80 fcntl(apl->fd, F_SETLK, &lock);
133 lock.l_type = F_WRLCK;
134 lock
[all...]
/macosx-10.10.1/Heimdal-398.1.2/lib/hx509/
H A Dlock.c60 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...]
/macosx-10.10.1/xnu-2782.1.97/iokit/IOKit/
H A DIOLocks.h55 Global lock group used by all IOKit locks. To simplify kext debugging and lock-heat analysis, consider using lck_* locks with a per-driver lock group, as defined in kern/locks.h.
64 * Mutex lock operations
76 @discussion Allocates a mutex in general purpose memory, and initializes 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. IOLocks use the global IOKit lock group, IOLockGroup. To simplify kext debugging and lock-heat analysis, consider using lck_* locks with a per-driver lock group, as defined in kern/locks.h.
77 @result Pointer to the allocated lock, or zero on failure. */
83 @discussion Frees a lock allocate
155 IOTakeLock( IOLock * lock) argument
156 IOTryLock( IOLock * lock) argument
157 IOUnlock( IOLock * lock) argument
294 IOReadLock( IORWLock * lock) argument
295 IOWriteLock( IORWLock * lock) argument
296 IORWUnlock( IORWLock * lock) argument
400 IOSimpleLockUnlockEnableInterrupt( IOSimpleLock * lock, IOInterruptState state ) argument
[all...]
/macosx-10.10.1/libmalloc-53.1.1/src/
H A Dmalloc_internal.h52 _malloc_lock_init(_malloc_lock_s *lock) { argument
54 *lock = _malloc_lock_init;
60 _malloc_lock_lock(_malloc_lock_s *lock) { argument
61 return os_lock_lock(lock);
66 _malloc_lock_trylock(_malloc_lock_s *lock) { argument
67 return os_lock_trylock(lock);
72 _malloc_lock_unlock(_malloc_lock_s *lock) { argument
73 return os_lock_unlock(lock);
80 _malloc_lock_lock(_malloc_lock_s *lock) { argument
81 return OSSpinLockLock(lock);
86 _malloc_lock_trylock(_malloc_lock_s *lock) argument
92 _malloc_lock_unlock(_malloc_lock_s *lock) argument
[all...]
/macosx-10.10.1/xnu-2782.1.97/osfmk/mach/
H A Dflipc_locks.h57 * 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.10.1/Security-57031.1.35/Security/include/security_asn1/
H A Dprlock.h59 * NSPR represents the lock as an opaque entity to the client of the
77 ** Returns a pointer to a newly created opaque lock object.
81 ** If the lock can not be created because of resource constraints, NULL
90 ** Destroys a given opaque lock object.
91 ** INPUTS: PRLock *lock
96 NSPR_API(void) PR_DestroyLock(PRLock *lock); variable
101 ** Lock a lock.
102 ** INPUTS: PRLock *lock
107 NSPR_API(void) PR_Lock(PRLock *lock); variable
112 ** Unlock a lock
119 NSPR_API(PRStatus) PR_Unlock(PRLock *lock); variable
[all...]
/macosx-10.10.1/Security-57031.1.35/Security/libsecurity_asn1/Security/
H A Dprlock.h59 * NSPR represents the lock as an opaque entity to the client of the
77 ** Returns a pointer to a newly created opaque lock object.
81 ** If the lock can not be created because of resource constraints, NULL
90 ** Destroys a given opaque lock object.
91 ** INPUTS: PRLock *lock
96 NSPR_API(void) PR_DestroyLock(PRLock *lock); variable
101 ** Lock a lock.
102 ** INPUTS: PRLock *lock
107 NSPR_API(void) PR_Lock(PRLock *lock); variable
112 ** Unlock a lock
119 NSPR_API(PRStatus) PR_Unlock(PRLock *lock); variable
[all...]
/macosx-10.10.1/Security-57031.1.35/Security/libsecurity_asn1/lib/
H A Dprlock.h59 * NSPR represents the lock as an opaque entity to the client of the
77 ** Returns a pointer to a newly created opaque lock object.
81 ** If the lock can not be created because of resource constraints, NULL
90 ** Destroys a given opaque lock object.
91 ** INPUTS: PRLock *lock
96 NSPR_API(void) PR_DestroyLock(PRLock *lock); variable
101 ** Lock a lock.
102 ** INPUTS: PRLock *lock
107 NSPR_API(void) PR_Lock(PRLock *lock); variable
112 ** Unlock a lock
119 NSPR_API(PRStatus) PR_Unlock(PRLock *lock); variable
[all...]
/macosx-10.10.1/Security-57031.1.35/Security/libsecurity_asn1/security_asn1/
H A Dprlock.h59 * NSPR represents the lock as an opaque entity to the client of the
77 ** Returns a pointer to a newly created opaque lock object.
81 ** If the lock can not be created because of resource constraints, NULL
90 ** Destroys a given opaque lock object.
91 ** INPUTS: PRLock *lock
96 NSPR_API(void) PR_DestroyLock(PRLock *lock); variable
101 ** Lock a lock.
102 ** INPUTS: PRLock *lock
107 NSPR_API(void) PR_Lock(PRLock *lock); variable
112 ** Unlock a lock
119 NSPR_API(PRStatus) PR_Unlock(PRLock *lock); variable
[all...]
/macosx-10.10.1/apr-32/apr-util/apr-util/include/
H A Dapr_anylock.h19 * @brief APR-Util transparent any lock flavor wrapper
28 /** Structure that may contain any APR lock type */
30 /** Indicates what type of lock is in lock */
35 apr_anylock_readlock, /**< Read lock */
36 apr_anylock_writelock /**< Write lock */
43 apr_thread_rwlock_t *rw; /**< Read-write lock */
45 } lock; member in struct:apr_anylock_t
55 ? apr_thread_mutex_lock((lck)->lock.tm) \
57 ? apr_proc_mutex_lock((lck)->lock
[all...]
/macosx-10.10.1/objc4-646/runtime/
H A Dobjc-lockdebug.mm25 * objc-lock.m
38 void *l; // the lock itself
39 int k; // the kind of lock it is (MUTEX, MONITOR, etc)
40 int i; // the lock's nest count
104 hasLock(_objc_lock_list *locks, void *lock, int kind)
110 if (locks->list[i].l == lock && locks->list[i].k == kind) return YES;
117 setLock(_objc_lock_list *locks, void *lock, int kind)
121 if (locks->list[i].l == lock && locks->list[i].k == kind) {
127 locks->list[locks->used].l = lock;
134 clearLock(_objc_lock_list *locks, void *lock, in
[all...]
/macosx-10.10.1/xnu-2782.1.97/bsd/kern/
H A Dkern_lockf.c66 #include <sys/lock.h>
91 void lf_print(const char *tag, struct lockf *lock);
92 void lf_printlist(const char *tag, struct lockf *lock);
118 * Overlapping lock states
150 * lock operation to be attempted.
174 struct lockf *lock; local
188 LOCKF_DEBUG(0, "lf_advlock: '%s' unlock without lock\n", vfs_context_proc(context)->p_comm);
259 MALLOC(lock, struct lockf *, sizeof *lock, M_LOCKF, M_WAITOK);
260 if (lock
318 struct lockf *lock; local
371 lf_coalesce_adjacent(struct lockf *lock) argument
451 lf_setlock(struct lockf *lock, struct timespec *timeout) argument
925 lf_getlock(struct lockf *lock, struct flock *fl, pid_t matchpid) argument
969 lf_getblock(struct lockf *lock, pid_t matchpid) argument
1041 lf_findoverlap(struct lockf *lf, struct lockf *lock, int type, struct lockf ***prev, struct lockf **overlap) argument
1283 lf_print(const char *tag, struct lockf *lock) argument
1323 lf_printlist(const char *tag, struct lockf *lock) argument
1408 lf_jump_to_queue_head(struct lockf *block, struct lockf *lock) argument
[all...]
/macosx-10.10.1/BerkeleyDB-21/db/java/src/com/sleepycat/db/
H A DLockNotGrantedException.java15 A LockNotGrantedException is thrown when a lock requested using the
17 methods, where the noWait flag or lock timers were configured, could not
21 Store database environment configured for lock timeouts was unable to
22 grant a lock in the allowed time.
24 Additionally, LockNotGrantedException is thrown when lock or transaction
29 private Lock lock; field in class:LockNotGrantedException
38 final DbLock lock,
45 this.lock = (lock == null) ? null : lock
34 LockNotGrantedException(final String message, final int op, final int mode, final DatabaseEntry obj, final DbLock lock, final int index, final DbEnv dbenv) argument
[all...]
H A DLockRequest.java13 The LockRequest object is used to encapsulate a single lock request.
16 private DbLock lock; field in class:LockRequest
24 Construct a LockRequest with the specified operation, mode and lock,
27 @param lock
28 The lock type for the object.
42 final Lock lock) {
44 this(op, mode, obj, lock, 0);
48 Construct a LockRequest with the specified operation, mode, lock and
51 @param lock
52 The lock typ
39 LockRequest(final LockOperation op, final LockRequestMode mode, final DatabaseEntry obj, final Lock lock) argument
66 LockRequest(final LockOperation op, final LockRequestMode mode, final DatabaseEntry obj, final Lock lock, final int timeout) argument
85 setLock(final Lock lock) argument
[all...]
/macosx-10.10.1/bmalloc-7600.1.17/bmalloc/
H A DVMHeap.h90 inline void VMHeap::deallocateSmallPage(std::unique_lock<StaticMutex>& lock, SmallPage* page) argument
92 lock.unlock();
94 lock.lock();
99 inline void VMHeap::deallocateMediumPage(std::unique_lock<StaticMutex>& lock, MediumPage* page) argument
101 lock.unlock();
103 lock.lock();
108 inline void VMHeap::deallocateLargeRange(std::unique_lock<StaticMutex>& lock, Range range) argument
118 lock
[all...]
H A DDeallocator.cpp57 std::lock_guard<StaticMutex> lock(PerProcess<Heap>::mutex());
62 heap->deallocateSmallLine(lock, smallLineCache.pop());
65 heap->deallocateMediumLine(lock, m_mediumLineCache.pop());
70 std::lock_guard<StaticMutex> lock(PerProcess<Heap>::mutex());
71 PerProcess<Heap>::getFastCase()->deallocateLarge(lock, object);
76 std::lock_guard<StaticMutex> lock(PerProcess<Heap>::mutex());
77 PerProcess<Heap>::getFastCase()->deallocateXLarge(lock, object);
82 std::lock_guard<StaticMutex> lock(PerProcess<Heap>::mutex());
87 if (!line->deref(lock))
89 deallocateSmallLine(lock, lin
122 deallocateSmallLine(std::lock_guard<StaticMutex>& lock, SmallLine* line) argument
145 deallocateMediumLine(std::lock_guard<StaticMutex>& lock, MediumLine* line) argument
[all...]
/macosx-10.10.1/WTF-7600.1.24/wtf/
H A DLocker.h38 explicit Locker(T& lockable) : m_lockable(&lockable) { lock(); }
39 explicit Locker(T* lockable) : m_lockable(lockable) { lock(); }
52 void lock() function in class:WTF::Locker
55 m_lockable->lock();
/macosx-10.10.1/libauto-186/
H A DLocks.h44 spin_lock_t lock; member in struct:Auto::LockedBoolean
45 LockedBoolean() : state(false), lock(0) {}
55 SpinLock(spin_lock_t *lock) : _lock(lock) { spin_lock(_lock); } argument
62 TrySpinLock(spin_lock_t *lock) : _lock(lock) { if (_lock && !spin_lock_try(_lock)) _lock = NULL; } argument
73 void check(bool volatile *condition, spin_lock_t *lock) { argument
75 spin_lock(lock);
77 spin_unlock(lock);
79 _lock = lock;
84 ConditionBarrier(bool volatile *condition, spin_lock_t *lock) argument
98 UnconditionalBarrier(bool volatile *condition, spin_lock_t *lock) argument
128 ReadLock(pthread_rwlock_t *lock) argument
135 WriteLock(pthread_rwlock_t *lock) argument
142 TryWriteLock(pthread_rwlock_t *lock) argument
[all...]
/macosx-10.10.1/bind9-45.101/bind9/bin/tests/
H A Drwlock_test.c34 isc_rwlock_t lock; variable
40 RUNTIME_CHECK(isc_rwlock_lock(&lock, isc_rwlocktype_read) ==
42 printf("%s got READ lock\n", message);
44 printf("%s giving up READ lock\n", message);
45 RUNTIME_CHECK(isc_rwlock_unlock(&lock, isc_rwlocktype_read) ==
47 RUNTIME_CHECK(isc_rwlock_lock(&lock, isc_rwlocktype_read) ==
49 printf("%s got READ lock\n", message);
51 printf("%s giving up READ lock\n", message);
52 RUNTIME_CHECK(isc_rwlock_unlock(&lock, isc_rwlocktype_read) ==
54 RUNTIME_CHECK(isc_rwlock_lock(&lock, isc_rwlocktype_writ
[all...]
/macosx-10.10.1/ksh-23/ksh/src/lib/libcoshell/
H A Dcosync.c86 struct flock lock; local
98 lock.l_type = F_RDLCK;
99 lock.l_whence = 0;
100 lock.l_start = 0;
101 lock.l_len = 1;
102 if (!fcntl(fd, F_SETLK, &lock))
104 lock.l_type = F_UNLCK;
105 fcntl(fd, F_SETLK, &lock);
/macosx-10.10.1/ruby-106/ruby/missing/
H A Dflock.c30 struct flock lock; local
34 lock.l_type = F_RDLCK;
37 lock.l_type = F_WRLCK;
40 lock.l_type = F_UNLCK;
46 lock.l_whence = SEEK_SET;
47 lock.l_start = lock.l_len = 0L;
49 return fcntl(fd, (operation & LOCK_NB) ? F_SETLK : F_SETLKW, &lock);
70 # define F_TLOCK 2 /* Test and lock a region for exclusive use */
97 /* LOCK_SH - get a shared lock */
[all...]

Completed in 174 milliseconds

1234567891011>>