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

Side by Side Diff: fusl/src/thread/mtx_timedlock.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 unified diff | Download patch
OLDNEW
1 #include <threads.h> 1 #include <threads.h>
2 #include <errno.h> 2 #include <errno.h>
3 3
4 int __pthread_mutex_timedlock(mtx_t *restrict, const struct timespec *restrict); 4 int __pthread_mutex_timedlock(mtx_t* restrict, const struct timespec* restrict);
5 5
6 int mtx_timedlock(mtx_t *restrict m, const struct timespec *restrict ts) 6 int mtx_timedlock(mtx_t* restrict m, const struct timespec* restrict ts) {
7 { 7 int ret = __pthread_mutex_timedlock(m, ts);
8 » int ret = __pthread_mutex_timedlock(m, ts); 8 switch (ret) {
9 » switch (ret) { 9 default:
10 » default: return thrd_error; 10 return thrd_error;
11 » case 0: return thrd_success; 11 case 0:
12 » case ETIMEDOUT: return thrd_timedout; 12 return thrd_success;
13 » } 13 case ETIMEDOUT:
14 return thrd_timedout;
15 }
14 } 16 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698