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

Side by Side Diff: fusl/src/thread/thrd_sleep.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 #include "syscall.h" 3 #include "syscall.h"
4 4
5 int thrd_sleep(const struct timespec *req, struct timespec *rem) 5 int thrd_sleep(const struct timespec* req, struct timespec* rem) {
6 { 6 int ret = __syscall(SYS_nanosleep, req, rem);
7 » int ret = __syscall(SYS_nanosleep, req, rem); 7 switch (ret) {
8 » switch (ret) { 8 case 0:
9 » case 0: return 0; 9 return 0;
10 » case -EINTR: return -1; /* value specified by C11 */ 10 case -EINTR:
11 » default: return -2; 11 return -1; /* value specified by C11 */
12 » } 12 default:
13 return -2;
14 }
13 } 15 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698