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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sysdeps/nacl/read.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sysdeps/nacl/sched_yield.c
diff --git a/sysdeps/nacl/sched_yield.c b/sysdeps/nacl/sched_yield.c
index 0bbd754965624959ef3c6ed7e1f77bd4efba25ce..38a03e4b273a9dbd939d3296c582cd99e0781189 100644
--- a/sysdeps/nacl/sched_yield.c
+++ b/sysdeps/nacl/sched_yield.c
@@ -9,10 +9,10 @@ int __sched_yield (void)
{
int result = __nacl_irt_sched_yield ();
if (result != 0) {
- errno = -result;
+ errno = result;
return -1;
}
- return -result;
+ return 0;
}
libc_hidden_def (__sched_yield)
weak_alias (__sched_yield, sched_yield)
« 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