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

Side by Side Diff: sysdeps/nacl/sched_yield.c

Issue 8116004: Fix error codes in read and sched_yield. (Closed) Base URL: http://git.chromium.org/native_client/nacl-glibc.git@master
Patch Set: Created 9 years, 2 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
« no previous file with comments | « sysdeps/nacl/read.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 #include <errno.h> 2 #include <errno.h>
3 #include <sched.h> 3 #include <sched.h>
4 4
5 #include <irt_syscalls.h> 5 #include <irt_syscalls.h>
6 6
7 7
8 int __sched_yield (void) 8 int __sched_yield (void)
9 { 9 {
10 int result = __nacl_irt_sched_yield (); 10 int result = __nacl_irt_sched_yield ();
11 if (result != 0) { 11 if (result != 0) {
12 errno = -result; 12 errno = result;
13 return -1; 13 return -1;
14 } 14 }
15 return -result; 15 return 0;
16 } 16 }
17 libc_hidden_def (__sched_yield) 17 libc_hidden_def (__sched_yield)
18 weak_alias (__sched_yield, sched_yield) 18 weak_alias (__sched_yield, sched_yield)
OLDNEW
« no previous file with comments | « sysdeps/nacl/read.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698