[Glibc-bsd-commits] r1992 - in trunk/glibc-ports: kfreebsd/linuxthreads patches

aurel32 at alioth.debian.org aurel32 at alioth.debian.org
Tue Aug 7 11:34:12 UTC 2007


Author: aurel32
Date: 2007-08-07 11:34:12 +0000 (Tue, 07 Aug 2007)
New Revision: 1992

Removed:
   trunk/glibc-ports/patches/linuxthreads_gscope.patch
Modified:
   trunk/glibc-ports/kfreebsd/linuxthreads/lowlevellock.h
Log:
* Finally use long for futexes. 
* Remove patches/linuxthreads_gscope.patch as it is directly integrated in the glibc patches for technical reasons (arch specific patches are applied before the other patches).



Modified: trunk/glibc-ports/kfreebsd/linuxthreads/lowlevellock.h
===================================================================
--- trunk/glibc-ports/kfreebsd/linuxthreads/lowlevellock.h	2007-08-01 12:38:55 UTC (rev 1991)
+++ trunk/glibc-ports/kfreebsd/linuxthreads/lowlevellock.h	2007-08-07 11:34:12 UTC (rev 1992)
@@ -34,16 +34,14 @@
 
 extern int __syscall__umtx_op(void *, int, long, void*, void*);
 
-#define lll_futex_wake(futexp, nr) \
-  ({									      \
-    __syscall__umtx_op(futexp, UMTX_OP_WAKE,			              \
-		       (long) nr, NULL, NULL);				      \
-  })
+static inline void lll_futex_wake(long *umtx, unsigned int nr_wakeup)
+{
+  __syscall__umtx_op(umtx, UMTX_OP_WAKE, nr_wakeup, NULL, NULL);
+}
 
-#define lll_futex_wait(futexp, val) \
-  ({									      \
-    __syscall__umtx_op(futexp, UMTX_OP_WAIT,				      \
-		       (long) val, NULL, NULL);				      \
-  })
+static inline void lll_futex_wait(long *umtx, unsigned int old_val)
+{
+  __syscall__umtx_op(umtx, UMTX_OP_WAIT, old_val, NULL, NULL);
+}
 
 #endif	/* lowlevellock.h */

Deleted: trunk/glibc-ports/patches/linuxthreads_gscope.patch
===================================================================
--- trunk/glibc-ports/patches/linuxthreads_gscope.patch	2007-08-01 12:38:55 UTC (rev 1991)
+++ trunk/glibc-ports/patches/linuxthreads_gscope.patch	2007-08-07 11:34:12 UTC (rev 1992)
@@ -1,57 +0,0 @@
-FreeBSD futexes are defined as long instead of int in the Linux kernel
-
---- linuxthreads/descr.h.orig	2007-08-01 13:41:37.000000000 +0200
-+++ linuxthreads/descr.h	2007-08-01 13:42:54.000000000 +0200
-@@ -124,7 +124,11 @@
-       uintptr_t sysinfo;
-       uintptr_t stack_guard;
-       uintptr_t pointer_guard;
-+# ifdef __FreeBSD_kernel__
-+      union { int gscope_flag; long int gscope_flag_long; };
-+# else
-       int gscope_flag;
-+# endif
-     } data;
-     void *__padding[16];
-   } p_header;
-@@ -132,7 +136,11 @@
- # define p_gscope_flag p_header.data.gscope_flag
- #elif TLS_MULTIPLE_THREADS_IN_TCB
-   int p_multiple_threads;
-+# ifdef __FreeBSD_kernel__
-+  union { int gscope_flag; long int gscope_flag_long; };
-+# else
-   int p_gscope_flag;
-+# endif
- #endif
- 
-   pthread_descr p_nextlive, p_prevlive;
---- linuxthreads/sysdeps/i386/tls.h.orig	2007-08-01 13:45:12.000000000 +0200
-+++ linuxthreads/sysdeps/i386/tls.h	2007-08-01 13:44:28.000000000 +0200
-@@ -50,7 +50,11 @@
-   uintptr_t sysinfo;
-   uintptr_t stack_guard;
-   uintptr_t pointer_guard;
-+#ifdef __FreeBSD_kernel__
-+  union { int gscope_flag; long int gscope_flag_long; };
-+#else
-   int gscope_flag;
-+#endif
- } tcbhead_t;
- 
- #else /* __ASSEMBLER__ */
-
---- linuxthreads/sysdeps/x86_64/tls.h.orig	2007-08-01 13:46:12.000000000 +0200
-+++ linuxthreads/sysdeps/x86_64/tls.h	2007-08-01 13:44:39.000000000 +0200
-@@ -49,7 +49,11 @@
-   uintptr_t sysinfo;
-   uintptr_t stack_guard;
-   uintptr_t pointer_guard;
-+#ifdef __FreeBSD_kernel__
-+  union { int gscope_flag; long int gscope_flag_long; };
-+#else
-   int gscope_flag;
-+#endif
- } tcbhead_t;
- 
- #else /* __ASSEMBLER__ */




More information about the Glibc-bsd-commits mailing list