Home
last modified time | relevance | path

Searched refs:rwlock (Results 1 – 3 of 3) sorted by relevance

/Zephyr-Core-2.7.6/lib/posix/
Dpthread_rwlock.c17 static uint32_t read_lock_acquire(pthread_rwlock_t *rwlock, int32_t timeout);
18 static uint32_t write_lock_acquire(pthread_rwlock_t *rwlock, int32_t timeout);
25 int pthread_rwlock_init(pthread_rwlock_t *rwlock, in pthread_rwlock_init() argument
28 k_sem_init(&rwlock->rd_sem, CONCURRENT_READER_LIMIT, in pthread_rwlock_init()
30 k_sem_init(&rwlock->wr_sem, 1, 1); in pthread_rwlock_init()
31 k_sem_init(&rwlock->reader_active, 1, 1); in pthread_rwlock_init()
32 rwlock->wr_owner = NULL; in pthread_rwlock_init()
33 rwlock->status = INITIALIZED; in pthread_rwlock_init()
42 int pthread_rwlock_destroy(pthread_rwlock_t *rwlock) in pthread_rwlock_destroy() argument
44 if (rwlock->status == NOT_INITIALIZED) { in pthread_rwlock_destroy()
[all …]
/Zephyr-Core-2.7.6/tests/posix/common/src/
Dposix_rwlock.c15 pthread_rwlock_t rwlock; variable
29 ret = pthread_rwlock_tryrdlock(&rwlock); in thread_top()
32 zassert_false(pthread_rwlock_rdlock(&rwlock), in thread_top()
39 zassert_false(pthread_rwlock_unlock(&rwlock), "Failed to unlock"); in thread_top()
42 ret = pthread_rwlock_trywrlock(&rwlock); in thread_top()
44 zassert_false(pthread_rwlock_wrlock(&rwlock), in thread_top()
51 zassert_false(pthread_rwlock_unlock(&rwlock), "Failed to unlock"); in thread_top()
68 zassert_equal(pthread_rwlock_destroy(&rwlock), EINVAL, NULL); in test_posix_rw_lock()
69 zassert_equal(pthread_rwlock_rdlock(&rwlock), EINVAL, NULL); in test_posix_rw_lock()
70 zassert_equal(pthread_rwlock_wrlock(&rwlock), EINVAL, NULL); in test_posix_rw_lock()
[all …]
/Zephyr-Core-2.7.6/include/posix/
Dpthread.h507 int pthread_rwlock_destroy(pthread_rwlock_t *rwlock);
508 int pthread_rwlock_init(pthread_rwlock_t *rwlock,
510 int pthread_rwlock_rdlock(pthread_rwlock_t *rwlock);
511 int pthread_rwlock_timedrdlock(pthread_rwlock_t *rwlock,
513 int pthread_rwlock_timedwrlock(pthread_rwlock_t *rwlock,
515 int pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock);
516 int pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock);
517 int pthread_rwlock_unlock(pthread_rwlock_t *rwlock);
518 int pthread_rwlock_wrlock(pthread_rwlock_t *rwlock);