Lines Matching full:shared
51 * 4 shared process-shared flag
90 /* process-shared mutexes are not supported at the moment */
100 /* our current implementation of pthread actually supports shared
102 * Nevertheless, it's better than nothing. Shared mutexes are used
121 * 13 shared process-shared flag
193 /* Mutex shared bit flag
195 * This flag is set to indicate that the mutex is shared among processes.
197 * (non-shared operations are much faster).
273 uint16_t shared) {
274 const uint16_t unlocked = shared | MUTEX_STATE_BITS_UNLOCKED;
275 const uint16_t locked_uncontended = shared | MUTEX_STATE_BITS_LOCKED_UNCONTENDED;
298 uint16_t shared,
301 if (__predict_true(__pthread_normal_mutex_trylock(mutex, shared) == 0)) {
307 const uint16_t unlocked = shared | MUTEX_STATE_BITS_UNLOCKED;
308 const uint16_t locked_contended = shared | MUTEX_STATE_BITS_LOCKED_CONTENDED;
328 if (__futex_wait_ex(&mutex->state, shared, locked_contended, rel_timeout) == -ETIMEDOUT) {
340 uint16_t shared) {
341 const uint16_t unlocked = shared | MUTEX_STATE_BITS_UNLOCKED;
342 const uint16_t locked_contended = shared | MUTEX_STATE_BITS_LOCKED_CONTENDED;
369 __futex_wake_ex(&mutex->state, shared, 1);
397 uint16_t shared,
406 shared, old_state, rel_timeout);
415 return __futex_wait_ex(&mutex->state, shared, (owner_tid << 16) | old_state, rel_timeout);
423 uint16_t shared = (old_state & MUTEX_SHARED_MASK);
427 return __pthread_normal_mutex_lock(mutex, shared, abs_timeout_or_null, clock);
439 const uint16_t unlocked = mtype | shared | MUTEX_STATE_BITS_UNLOCKED;
440 const uint16_t locked_uncontended = mtype | shared | MUTEX_STATE_BITS_LOCKED_UNCONTENDED;
441 const uint16_t locked_contended = mtype | shared | MUTEX_STATE_BITS_LOCKED_CONTENDED;
496 if (__recursive_or_errorcheck_mutex_wait(mutex, shared, old_state, rel_timeout) == -ETIMEDOUT) {
514 uint16_t shared = (old_state & MUTEX_SHARED_MASK);
517 if (__predict_true(__pthread_normal_mutex_trylock(mutex, shared) == 0)) {
535 uint16_t shared = (old_state & MUTEX_SHARED_MASK);
539 __pthread_normal_mutex_unlock(mutex, shared);
565 const uint16_t unlocked = mtype | shared | MUTEX_STATE_BITS_UNLOCKED;
568 __futex_wake_ex(&mutex->state, shared, 1);
579 uint16_t shared = (old_state & MUTEX_SHARED_MASK);
581 const uint16_t unlocked = mtype | shared | MUTEX_STATE_BITS_UNLOCKED;
582 const uint16_t locked_uncontended = mtype | shared | MUTEX_STATE_BITS_LOCKED_UNCONTENDED;
586 return __pthread_normal_mutex_trylock(mutex, shared);