Home
last modified time | relevance | path

Searched refs:pshared (Results 1 – 7 of 7) sorted by relevance

/aosp12/bionic/libc/bionic/
H A Dpthread_barrier.cpp46 *pshared = (*attr & 1) ? PTHREAD_PROCESS_SHARED : PTHREAD_PROCESS_PRIVATE; in pthread_barrierattr_getpshared()
50 int pthread_barrierattr_setpshared(pthread_barrierattr_t* attr, int pshared) { in pthread_barrierattr_setpshared() argument
51 if (pshared == PTHREAD_PROCESS_SHARED) { in pthread_barrierattr_setpshared()
76 bool pshared; member
100 barrier->pshared = false; in pthread_barrier_init()
102 barrier->pshared = true; in pthread_barrier_init()
121 __futex_wait_ex(&barrier->state, barrier->pshared, RELEASE, false, nullptr); in pthread_barrier_wait()
149 __futex_wake_ex(&barrier->state, barrier->pshared, prev_wait_count); in pthread_barrier_wait()
155 __futex_wait_ex(&barrier->state, barrier->pshared, WAIT, false, nullptr); in pthread_barrier_wait()
163 __futex_wake_ex(&barrier->state, barrier->pshared, barrier->init_count); in pthread_barrier_wait()
[all …]
H A Dpthread_rwlock.cpp77 *attr = (*attr & ~RWLOCKATTR_PSHARED_MASK) | (pshared << RWLOCKATTR_PSHARED_SHIFT); in __rwlockattr_setpshared()
99 int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t* attr, int* pshared) { in pthread_rwlockattr_getpshared() argument
101 *pshared = PTHREAD_PROCESS_SHARED; in pthread_rwlockattr_getpshared()
103 *pshared = PTHREAD_PROCESS_PRIVATE; in pthread_rwlockattr_getpshared()
108 int pthread_rwlockattr_setpshared(pthread_rwlockattr_t* attr, int pshared) { in pthread_rwlockattr_setpshared() argument
109 switch (pshared) { in pthread_rwlockattr_setpshared()
161 bool pshared; member
232 rwlock->pshared = __rwlockattr_getpshared(attr); in pthread_rwlock_init()
250 rwlock->pending_lock.init(rwlock->pshared); in pthread_rwlock_init()
518 __futex_wake_ex(&rwlock->pending_writer_wakeup_serial, rwlock->pshared, 1); in pthread_rwlock_unlock()
[all …]
H A Dpthread_cond.cpp74 int pthread_condattr_getpshared(const pthread_condattr_t* attr, int* pshared) { in pthread_condattr_getpshared() argument
75 *pshared = static_cast<int>(COND_IS_SHARED(*attr)); in pthread_condattr_getpshared()
79 int pthread_condattr_setpshared(pthread_condattr_t* attr, int pshared) { in pthread_condattr_setpshared() argument
80 if (pshared != PTHREAD_PROCESS_SHARED && pshared != PTHREAD_PROCESS_PRIVATE) { in pthread_condattr_setpshared()
84 *attr |= pshared; in pthread_condattr_setpshared()
H A Dpthread_spinlock.cpp50 int pthread_spin_init(pthread_spinlock_t* lock_interface, int pshared) { in pthread_spin_init() argument
52 lock->lock.init(pshared); in pthread_spin_init()
H A Dsemaphore.cpp103 int sem_init(sem_t* sem, int pshared, unsigned int value) { in sem_init() argument
111 if (pshared != 0) { in sem_init()
H A Dpthread_mutex.cpp98 int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared) in pthread_mutexattr_setpshared() argument
100 switch (pshared) { in pthread_mutexattr_setpshared()
117 int pthread_mutexattr_getpshared(const pthread_mutexattr_t* attr, int* pshared) { in pthread_mutexattr_getpshared() argument
118 *pshared = (*attr & MUTEXATTR_SHARED_MASK) ? PTHREAD_PROCESS_SHARED : PTHREAD_PROCESS_PRIVATE; in pthread_mutexattr_getpshared()
/aosp12/bionic/tests/
H A Dpthread_test.cpp842 int pshared; in TEST() local
844 ASSERT_EQ(pshared_value_array[i], pshared); in TEST()
1421 int pshared; in TEST() local
1422 ASSERT_EQ(0, pthread_condattr_getpshared(&attr, &pshared)); in TEST()
1423 ASSERT_EQ(PTHREAD_PROCESS_PRIVATE, pshared); in TEST()
1460 int pshared; in TEST() local
1461 ASSERT_EQ(0, pthread_condattr_getpshared(&attr, &pshared)); in TEST()
1462 ASSERT_EQ(PTHREAD_PROCESS_SHARED, pshared); in TEST()
2649 int pshared; in TEST() local
2651 ASSERT_EQ(PTHREAD_PROCESS_PRIVATE, pshared); in TEST()
[all …]