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

Side by Side Diff: fusl/src/select/poll.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 <poll.h> 1 #include <poll.h>
2 #include <time.h> 2 #include <time.h>
3 #include <signal.h> 3 #include <signal.h>
4 #include "syscall.h" 4 #include "syscall.h"
5 #include "libc.h" 5 #include "libc.h"
6 6
7 int poll(struct pollfd *fds, nfds_t n, int timeout) 7 int poll(struct pollfd* fds, nfds_t n, int timeout) {
8 {
9 #ifdef SYS_poll 8 #ifdef SYS_poll
10 » return syscall_cp(SYS_poll, fds, n, timeout); 9 return syscall_cp(SYS_poll, fds, n, timeout);
11 #else 10 #else
12 » return syscall_cp(SYS_ppoll, fds, n, timeout>=0 ? 11 return syscall_cp(
13 » » &((struct timespec){ .tv_sec = timeout/1000, 12 SYS_ppoll, fds, n,
14 » » .tv_nsec = timeout%1000*1000000 }) : 0, 0, _NSIG/8); 13 timeout >= 0
14 ? &((struct timespec){.tv_sec = timeout / 1000,
15 .tv_nsec = timeout % 1000 * 1000000})
16 : 0,
17 0, _NSIG / 8);
15 #endif 18 #endif
16 } 19 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698