Thread problem in thread-m.h
Wolfram Gloger
wmglo@dent.med.uni-muenchen.de
Tue Dec 29 04:08:00 GMT 1998
> 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 */
More information about the Libc-hacker
mailing list