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

Side by Side Diff: sysdeps/nacl/exit-thread.c

Issue 7785030: Replace #define syscalls cancel machinery. (Closed) Base URL: http://git.chromium.org/native_client/nacl-glibc.git@master
Patch Set: Cosmetic change Created 9 years, 3 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 | « nptl/sysdeps/x86_64/tls.h ('k') | sysdeps/nacl/futex_emulation.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include <atomic.h> 1 #include <atomic.h>
2 #include <irt_syscalls.h> 2 #include <irt_syscalls.h>
3 #include <nptl/pthreadP.h> 3 #include <nptl/pthreadP.h>
4 #include <unistd.h> 4 #include <unistd.h>
5 5
6 void __exit_thread (int val) 6 void __exit_thread (int val)
7 { 7 {
8 /* We are about to die: make our pd "almost free" and wake up waiter. */ 8 /* We are about to die: make our pd "almost free" and wake up waiter. */
9 struct pthread* pd = THREAD_SELF; 9 struct pthread* pd = THREAD_SELF;
10 int count;
10 pd->tid = -2; 11 pd->tid = -2;
11 __nacl_futex_wake (&pd->tid, INT_MAX, __FUTEX_BITSET_MATCH_ANY); 12 __nacl_futex_wake (&pd->tid, INT_MAX, __FUTEX_BITSET_MATCH_ANY, &count);
12 __nacl_irt_thread_exit (&pd->tid); 13 __nacl_irt_thread_exit (&pd->tid);
13 /* Not reached */ 14 /* Not reached */
14 __asm__ ("hlt"); 15 __asm__ ("hlt");
15 } 16 }
OLDNEW
« no previous file with comments | « nptl/sysdeps/x86_64/tls.h ('k') | sysdeps/nacl/futex_emulation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698