This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

Re: [PATCH] Add multiple inclusion guards to useldt.h


On Fri, Oct 01, 2004 at 10:33:39AM +0200, Thorsten Kukuk wrote:
> On Sat, Sep 25, Jakub Jelinek wrote:
> 
> > Hi!
> > 
> > >From reading the code, I believe i686 --with-tls linuxthreads
> > are now broken.
> 
> It is still broken for me using --with-tls --without-__thread.
> 
> All thread test cases will be killed.

I know, I'm using following patch ATM, but didn't have time to figure
out why exactly current CVS doesn't work, which would be good to understand
so that it can be fixed for real.

2004-09-26  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/i386/tls.h: Only include useldt.h if THREAD_SELF
	is not defined.
	* sysdeps/i386/i686/pt-machine.h: Revert last change.

--- libc/linuxthreads/sysdeps/i386/tls.h	25 Sep 2004 03:32:13 -0000	1.36
+++ libc/linuxthreads/sysdeps/i386/tls.h	26 Sep 2004 08:45:21 -0000	1.35.2.3
@@ -113,7 +113,9 @@ typedef struct
 #   define TLS_LOAD_EBX
 #  endif
 
-#  include "useldt.h"		/* For the structure.  */
+#  ifndef THREAD_SELF
+#   include "useldt.h"		/* For the structure.  */
+#  endif
 #  if __ASSUME_LDT_WORKS > 0
 #   define TLS_DO_MODIFY_LDT_KERNEL_CHECK(doit) (doit) /* Nothing to check.  */
 #  else
--- libc/linuxthreads/sysdeps/i386/i686/pt-machine.h	25 Sep 2004 10:04:15 -0000	1.23
+++ libc/linuxthreads/sysdeps/i386/i686/pt-machine.h	26 Sep 2004 08:45:22 -0000	1.22.2.2
@@ -69,9 +69,7 @@ __compare_and_swap (long int *p, long in
 }
 #endif
 
-/* If tls.h was included, it will include useldt.h after defining USE_TLS.
-   We don't want to include it here first when tls.h includes us.  */
-#if __ASSUME_LDT_WORKS > 0 && !defined _TLS_H
+#if __ASSUME_LDT_WORKS > 0
 #include "../useldt.h"
 #endif
 


	Jakub


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