This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] PowerPC thread pointer bias requires powerpc/lowlevelrobustlock.sym

I've been sitting on this patch for way too long.  

The TID implementation in the default lowlevelrobustlock.sym is wrong
for PowerPC.  The thread point on PowerPC is biased by -0x7000 to extend
the size of the FAST TLS to 64KB.  This patch provides a powerpc
implementation to take this into account.

Ryan S. Arnold
IBM Linux Technology Center
2006-11-01  Ryan S. Arnold  <>
	* sysdeps/unix/sysv/linux/powerpc/lowlevelrobustlock.sym: New file.
	Powerpc thread pointer bias requires separate implementation of TID
	for powerpc.

diff -uNr glibc-orig/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevelrobustlock.sym glibc/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevelrobustlock.sym
--- glibc-orig/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevelrobustlock.sym	1969-12-31 16:00:00.000000000 -0800
+++ glibc/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevelrobustlock.sym	2006-05-22 12:06:33.000000000 -0700
@@ -0,0 +1,11 @@
+#include <sysdep.h>
+#include <tls.h>
+-- Abuse tls.h macros to derive offsets relative to the thread register.
+# undef __thread_register
+# define __thread_register	((void *) 0)
+# define thread_offsetof(mem)	((ptrdiff_t) THREAD_SELF + offsetof (struct pthread, mem))
+TID				thread_offsetof (tid)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]