[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r2474 - in glibc-package/trunk/debian: . patches patches/amd64 patches/i386



Author: aurel32
Date: 2007-07-29 14:02:30 +0000 (Sun, 29 Jul 2007)
New Revision: 2474

Added:
   glibc-package/trunk/debian/patches/amd64/local-linuxthreads-gscope.diff
   glibc-package/trunk/debian/patches/i386/local-linuxthreads-gscope.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
  * amd64/local-linuxthreads-gscope.diff: new patch to fix build on *i386
    with linuxthreads.
  * i386/local-linuxthreads-gscope.diff: new patch to fix build on *amd64
    with linuxthreads.



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2007-07-29 13:49:59 UTC (rev 2473)
+++ glibc-package/trunk/debian/changelog	2007-07-29 14:02:30 UTC (rev 2474)
@@ -11,14 +11,18 @@
   * sparc/submitted-gscope_flag.diff: update from upstream.
   * hppa/submitted-gscope_flag.diff : new patch to fix build on hppa
     with NPTL.
-  * any/local-linuxthreads-gscope.diff: new patch to add gscope support 
+  * any/local-linuxthreads-gscope.diff: new patch to add gscope support
     to linuxthreads.
-  * hppa/local-linuxthreads-gscope.diff: new patch to fix build on hppa 
+  * hppa/local-linuxthreads-gscope.diff: new patch to fix build on hppa
     with linuxthreads.  Closes: #434799.
   * cvs-printf_fp.c.diff: new patch to  print the wrong number of digits
     with %#g.
+  * amd64/local-linuxthreads-gscope.diff: new patch to fix build on *i386
+    with linuxthreads.
+  * i386/local-linuxthreads-gscope.diff: new patch to fix build on *amd64
+    with linuxthreads.
 
- -- Aurelien Jarno <aurel32@debian.org>  Sun, 29 Jul 2007 02:36:38 +0200
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 29 Jul 2007 16:01:30 +0200
 
 glibc (2.6-4) unstable; urgency=low
 

Added: glibc-package/trunk/debian/patches/amd64/local-linuxthreads-gscope.diff
===================================================================
--- glibc-package/trunk/debian/patches/amd64/local-linuxthreads-gscope.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/amd64/local-linuxthreads-gscope.diff	2007-07-29 14:02:30 UTC (rev 2474)
@@ -0,0 +1,37 @@
+--- linuxthreads/sysdeps/x86_64/tls.h.orig	2007-07-29 15:55:45 +0200
++++ linuxthreads/sysdeps/x86_64/tls.h	2007-07-29 15:56:31 +0200
+@@ -49,6 +49,7 @@
+   uintptr_t sysinfo;
+   uintptr_t stack_guard;
+   uintptr_t pointer_guard;
++  int gscope_flag;
+ } tcbhead_t;
+ 
+ #else /* __ASSEMBLER__ */
+@@ -147,6 +148,26 @@
+   ((descr)->p_header.data.pointer_guard				      \
+    = THREAD_GETMEM (THREAD_SELF, p_header.data.pointer_guard))
+ 
++/* Get and set the global scope generation counter in the TCB head.  */
++#define THREAD_GSCOPE_FLAG_UNUSED 0
++#define THREAD_GSCOPE_FLAG_USED   1
++#define THREAD_GSCOPE_FLAG_WAIT   2
++#define THREAD_GSCOPE_RESET_FLAG() \
++  do										    \
++    { int __res;								    \
++      asm volatile ("xchgl %0, %%fs:%P1"					    \
++		    : "=r" (__res)						    \
++		    : "i" (offsetof (struct _pthread_descr_struct, p_gscope_flag)), \
++		      "0" (THREAD_GSCOPE_FLAG_UNUSED));				    \
++      if (__res == THREAD_GSCOPE_FLAG_WAIT)					    \
++	lll_futex_wake (&THREAD_SELF->p_gscope_flag, 1);			    \
++    }										    \
++  while (0)
++#define THREAD_GSCOPE_SET_FLAG() \
++  THREAD_SETMEM (THREAD_SELF, p_gscope_flag, THREAD_GSCOPE_FLAG_USED)
++#define THREAD_GSCOPE_WAIT() \
++  GL(dl_wait_lookup_done) ()
++
+ # endif	/* HAVE_TLS_SUPPORT */
+ #endif /* __ASSEMBLER__ */
+ 

Added: glibc-package/trunk/debian/patches/i386/local-linuxthreads-gscope.diff
===================================================================
--- glibc-package/trunk/debian/patches/i386/local-linuxthreads-gscope.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/i386/local-linuxthreads-gscope.diff	2007-07-29 14:02:30 UTC (rev 2474)
@@ -0,0 +1,36 @@
+--- linuxthreads/sysdeps/i386/tls.h	2006-04-26 17:04:12 +0200
++++ linuxthreads/sysdeps/i386/tls.h	2007-07-29 11:09:35 +0200
+@@ -50,6 +50,7 @@
+   uintptr_t sysinfo;
+   uintptr_t stack_guard;
+   uintptr_t pointer_guard;
++  int gscope_flag;
+ } tcbhead_t;
+ 
+ #else /* __ASSEMBLER__ */
+@@ -240,6 +241,25 @@
+   ((descr)->p_header.data.pointer_guard				      \
+    = THREAD_GETMEM (THREAD_SELF, p_header.data.pointer_guard))
+ 
++/* Get and set the global scope generation counter in the TCB head.  */
++#define THREAD_GSCOPE_FLAG_UNUSED 0
++#define THREAD_GSCOPE_FLAG_USED   1
++#define THREAD_GSCOPE_FLAG_WAIT   2
++#define THREAD_GSCOPE_RESET_FLAG() \
++  do										    \
++    { int __res;								    \
++      asm volatile ("xchgl %0, %%gs:%P1"					    \
++		    : "=r" (__res)						    \
++		    : "i" (offsetof (struct _pthread_descr_struct, p_gscope_flag)), \
++		      "0" (THREAD_GSCOPE_FLAG_UNUSED));				    \
++      if (__res == THREAD_GSCOPE_FLAG_WAIT)					    \
++	lll_futex_wake (&THREAD_SELF->p_gscope_flag, 1);			    \
++    }										    \
++  while (0)
++#define THREAD_GSCOPE_SET_FLAG() \
++  THREAD_SETMEM (THREAD_SELF, p_gscope_flag, THREAD_GSCOPE_FLAG_USED)
++#define THREAD_GSCOPE_WAIT() \
++  GL(dl_wait_lookup_done) ()
+ 
+ # endif	/* HAVE_TLS_SUPPORT && (FLOATING_STACKS || !IS_IN_libpthread) */
+ #endif /* __ASSEMBLER__ */

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series	2007-07-29 13:49:59 UTC (rev 2473)
+++ glibc-package/trunk/debian/patches/series	2007-07-29 14:02:30 UTC (rev 2474)
@@ -41,6 +41,7 @@
 alpha/submitted-xstat.diff -p0
 
 amd64/local-biarch.diff 
+amd64/local-linuxthreads-gscope.diff -p0
 
 arm/cvs-gcc4-inline.diff -p0
 arm/cvs-gscope_flag.diff -p0
@@ -78,6 +79,7 @@
 
 i386/local-biarch.diff 
 i386/local-cmov.diff -p0
+i386/local-linuxthreads-gscope.diff -p0
 i386/submitted-i686-timing.diff -p0
 
 m68k/local-compat.diff -p0



Reply to: