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

Unified Diff: fusl/src/thread/__lock.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/__lock.c
diff --git a/fusl/src/thread/__lock.c b/fusl/src/thread/__lock.c
index 0874c04a4c0a81a9fa0dc032479ec18cec81d8aa..f5e1377cfa13a2b5443f2970c9264783b796c9f8 100644
--- a/fusl/src/thread/__lock.c
+++ b/fusl/src/thread/__lock.c
@@ -1,15 +1,15 @@
#include "pthread_impl.h"
-void __lock(volatile int *l)
-{
- if (libc.threads_minus_1)
- while (a_swap(l, 1)) __wait(l, l+1, 1, 1);
+void __lock(volatile int* l) {
+ if (libc.threads_minus_1)
+ while (a_swap(l, 1))
+ __wait(l, l + 1, 1, 1);
}
-void __unlock(volatile int *l)
-{
- if (l[0]) {
- a_store(l, 0);
- if (l[1]) __wake(l, 1, 1);
- }
+void __unlock(volatile int* l) {
+ if (l[0]) {
+ a_store(l, 0);
+ if (l[1])
+ __wake(l, 1, 1);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698