mirror of
https://github.com/ziglang/zig.git
synced 2025-12-07 06:43:07 +00:00
12 lines
274 B
C
Vendored
12 lines
274 B
C
Vendored
#include "pthread_impl.h"
|
|
|
|
int __pthread_rwlock_tryrdlock(pthread_rwlock_t *rw)
|
|
{
|
|
if (rw->_rw_lock == 0x7fffffff) return EBUSY;
|
|
if (rw->_rw_lock == 0x7ffffffe) return EAGAIN;
|
|
rw->_rw_lock++;
|
|
return 0;
|
|
}
|
|
|
|
weak_alias(__pthread_rwlock_tryrdlock, pthread_rwlock_tryrdlock);
|