Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1083)

Unified Diff: fusl/src/thread/pthread_rwlock_tryrdlock.c

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fusl/src/thread/pthread_rwlock_tryrdlock.c
diff --git a/fusl/src/thread/pthread_rwlock_tryrdlock.c b/fusl/src/thread/pthread_rwlock_tryrdlock.c
index fa271fcc6a156a78e9dfe975bf084113e3aa3167..0246fc5f9e044cee6ccf323c0cca6e7b350f2e67 100644
--- a/fusl/src/thread/pthread_rwlock_tryrdlock.c
+++ b/fusl/src/thread/pthread_rwlock_tryrdlock.c
@@ -1,13 +1,14 @@
#include "pthread_impl.h"
-int pthread_rwlock_tryrdlock(pthread_rwlock_t *rw)
-{
- int val, cnt;
- do {
- val = rw->_rw_lock;
- cnt = val & 0x7fffffff;
- if (cnt == 0x7fffffff) return EBUSY;
- if (cnt == 0x7ffffffe) return EAGAIN;
- } while (a_cas(&rw->_rw_lock, val, val+1) != val);
- return 0;
+int pthread_rwlock_tryrdlock(pthread_rwlock_t* rw) {
+ int val, cnt;
+ do {
+ val = rw->_rw_lock;
+ cnt = val & 0x7fffffff;
+ if (cnt == 0x7fffffff)
+ return EBUSY;
+ if (cnt == 0x7ffffffe)
+ return EAGAIN;
+ } while (a_cas(&rw->_rw_lock, val, val + 1) != val);
+ return 0;
}

Powered by Google App Engine
This is Rietveld 408576698