This is the mail archive of the libc-alpha@sources.redhat.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]
Other format: [Raw text]

[PATCH] Fix sysdeps/mach/hurd/malloc-machine.h


On Wed, Oct 01, 2003 at 12:11:38PM +0200, Alfred M. Szmidt wrote:
> The recent malloc changes are broken on GNU/Hurd.  I'm not sure what
> tsd_key_t, tsd_getspecific(), tsd_setspecific() and tsd_key_create()
> should be defined to, so if someone could give me a hint then that
> would be nice.

This patch should fix the problem:

2003-10-02  Jeroen Dekkers  <jeroen@dekkers.cx>

	* sysdeps/mach/hurd/malloc-machine.h: Copy the tsd code from
          the old thread-m.h header too.

Index: sysdeps/mach/hurd/malloc-machine.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/mach/hurd/malloc-machine.h,v
retrieving revision 1.1
diff -u -p -r1.1 malloc-machine.h
--- sysdeps/mach/hurd/malloc-machine.h	30 Sep 2003 02:08:37 -0000	1.1
+++ sysdeps/mach/hurd/malloc-machine.h	2 Oct 2003 12:56:02 -0000
@@ -53,6 +53,16 @@
 /* No we're *not* using pthreads.  */
 #define __pthread_initialize ((void (*)(void))0)
 
+/* thread specific data for glibc */
+
+#include <bits/libc-tsd.h>
+
+typedef int tsd_key_t[1];	/* no key data structure, libc magic does it */
+__libc_tsd_define (static, MALLOC)	/* declaration/common definition */
+#define tsd_key_create(key, destr)	((void) (key))
+#define tsd_setspecific(key, data)	__libc_tsd_set (MALLOC, (data))
+#define tsd_getspecific(key, vptr)	((vptr) = __libc_tsd_get (MALLOC))
+
 #include <sysdeps/generic/malloc-machine.h>
 
 #endif /* !defined(_MALLOC_MACHINE_H) */


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