aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-08-17 06:54:04 +0000
committerRoland McGrath <roland@gnu.org>2002-08-17 06:54:04 +0000
commit3ed35099c1f7d96f4048a3d899cba8380f29f914 (patch)
tree5565c68b17964b1b135794be50c5e29fd7e48a8b /linuxthreads
parent25cb6eb22999e61aa3f97009c561eb142ca846ce (diff)
downloadglibc-3ed35099c1f7d96f4048a3d899cba8380f29f914.tar
glibc-3ed35099c1f7d96f4048a3d899cba8380f29f914.tar.gz
glibc-3ed35099c1f7d96f4048a3d899cba8380f29f914.tar.bz2
glibc-3ed35099c1f7d96f4048a3d899cba8380f29f914.zip
* sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
register value from entry number properly.
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog3
-rw-r--r--linuxthreads/sysdeps/i386/tls.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 9fa83225e6..c2004912b3 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,5 +1,8 @@
2002-08-16 Roland McGrath <roland@redhat.com>
+ * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
+ register value from entry number properly.
+
* sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
optimally conditional on [__PIC__].
(TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
diff --git a/linuxthreads/sysdeps/i386/tls.h b/linuxthreads/sysdeps/i386/tls.h
index efbaebcd85..5de8eca18d 100644
--- a/linuxthreads/sysdeps/i386/tls.h
+++ b/linuxthreads/sysdeps/i386/tls.h
@@ -130,7 +130,7 @@ typedef struct
to let the compiler know that we are accessing LDT_ENTRY \
here. */ \
TLS_EBX_ARG (&ldt_entry), "m" (ldt_entry)); \
- __builtin_expect (result, 0) == 0 ? ldt_entry.entry_number : -1; \
+ __builtin_expect (result, 0) == 0 ? ldt_entry.entry_number * 8 + 3 : -1; \
})
# ifdef __ASSUME_SET_THREAD_AREA_SYSCALL