Last change
on this file since 445 was 444, checked in by coas-nagasima, 4 years ago |
muslのソースコードを追加
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-csrc;charset=UTF-8
|
File size:
293 bytes
|
Line | |
---|
1 | #include "pthread_impl.h"
|
---|
2 |
|
---|
3 | int pthread_rwlock_tryrdlock(pthread_rwlock_t *rw)
|
---|
4 | {
|
---|
5 | int val, cnt;
|
---|
6 | do {
|
---|
7 | val = rw->_rw_lock;
|
---|
8 | cnt = val & 0x7fffffff;
|
---|
9 | if (cnt == 0x7fffffff) return EBUSY;
|
---|
10 | if (cnt == 0x7ffffffe) return EAGAIN;
|
---|
11 | } while (a_cas(&rw->_rw_lock, val, val+1) != val);
|
---|
12 | return 0;
|
---|
13 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.