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

Unified Diff: nptl/sysdeps/pthread/createthread.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, 4 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 | « nptl/sysdeps/i386/tls.h ('k') | nptl/sysdeps/x86_64/tls.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: nptl/sysdeps/pthread/createthread.c
diff --git a/nptl/sysdeps/pthread/createthread.c b/nptl/sysdeps/pthread/createthread.c
index f66c06fb9d40b00962e3a2acc9a3124d5bf8f856..84b30a3b93b15511e759daf3b4b236df84e43a95 100644
--- a/nptl/sysdeps/pthread/createthread.c
+++ b/nptl/sysdeps/pthread/createthread.c
@@ -78,9 +78,9 @@ do_clone (struct pthread *pd, const struct pthread_attr *attr,
#endif
/* Native Client does not have a notion of a thread ID, so we make
- one up. This must be positive to mark the thread as not
- exited. */
- pd->tid = ((unsigned int) pd) >> 2;
+ one up. This must be small enough to leave space for number identifying
+ the clock. Use CLOCK_IDFIELD_SIZE to guarantee that. */
+ pd->tid = ((unsigned int) pd) >> CLOCK_IDFIELD_SIZE;
/* Native Client syscall thread_create does not push return address onto stack
as opposed to the kernel. We emulate this behavior on x86-64 to meet the
« no previous file with comments | « nptl/sysdeps/i386/tls.h ('k') | nptl/sysdeps/x86_64/tls.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698