This is the mail archive of the libc-hacker@sourceware.cygnus.com 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]

Re: Thread problem in thread-m.h


Well this definetly gets me past where I was.  I will leave the pthreads hacking to someone who knows what they are doing. =)  This will also help the deep and hidden cygwin port that I'm playing with.

I don't know if it's a big enough event to go into the PROJECTS file, but if there's a lesser platform-specific todo list somewhere, I think that finishing the threads support on Solaris 2.6 should go into there as a note somewhere so it doesn't get forgotten.

Tks,
Jeff Bailey

>>> Wolfram Gloger <wmglo@dent.med.uni-muenchen.de> 12/29 4:08 AM >>>
> I need some assistance trying to figure out what ought to happen here with the threads:
> 
> In file included from malloc.c:310:
> thread-m.h:217: warning: `tsd_key_create' redefined
> thread-m.h:98: warning: this is the location of the previous definition
> Or have I missed something completely here?

I would have assumed Solaris 2.6 has good support for pthreads,
but then again we may not be able to use it, and/or LinuxThreads
is not ready for Solaris...

Anyway, the change for using glibc's new thread-specific data has
broken the NO_THREADS case, so I think the following is the correct
fix.

Regards,
Wolfram.

1998-12-29  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>

	* malloc/thread-m.h [_LIBC] : Fix for NO_THREADS case.

Index: thread-m.h
===================================================================
RCS file: /cvs/glibc/libc/malloc/thread-m.h,v
retrieving revision 1.9
diff -c -r1.9 thread-m.h
*** thread-m.h	1998/11/30 14:19:08	1.9
--- thread-m.h	1998/12/29 12:00:29
***************
*** 88,95 ****
  
  #endif /* MUTEX_INITIALIZER && PTHREAD_MUTEX_INITIALIZER */
  
  
! /* thread specific data */
  
  #include <bits/libc-tsd.h>
  
--- 88,96 ----
  
  #endif /* MUTEX_INITIALIZER && PTHREAD_MUTEX_INITIALIZER */
  
+ #ifndef NO_THREADS
  
! /* thread specific data for glibc */
  
  #include <bits/libc-tsd.h>
  
***************
*** 99,104 ****
--- 100,106 ----
  #define tsd_setspecific(key, data)	__libc_tsd_set (MALLOC, (data))
  #define tsd_getspecific(key, vptr)	((vptr) = __libc_tsd_get (MALLOC))
  
+ #endif
  
  #elif defined(USE_PTHREADS) /* Posix threads */
  



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