about summary refs log tree commit diff
path: root/linuxthreads/internals.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-12-28 10:24:40 +0000
committerUlrich Drepper <drepper@redhat.com>2002-12-28 10:24:40 +0000
commit270d9d472952a8923fa8a6d9d830fea77f4b838f (patch)
treed5fa14a0a0fd3cdc509580686af55bc93ceb93e7 /linuxthreads/internals.h
parentafb2e954009b7ff48379a254926730b303ce7bab (diff)
downloadglibc-270d9d472952a8923fa8a6d9d830fea77f4b838f.tar.gz
glibc-270d9d472952a8923fa8a6d9d830fea77f4b838f.tar.xz
glibc-270d9d472952a8923fa8a6d9d830fea77f4b838f.zip
Update.
	* inet/herrno.c (__h_errno_location): Remove.
	* inet/Makefile (routines): Add herrno-loc.
	* resolv/res_libc.c (__res_state): Remove.
	* resolv/Makefile (routines): Add res-state.
	* sysdeps/generic/herrno-loc.c: New file.
	* sysdeps/generic/res-state.c: New file.

2002-12-27  Jakub Jelinek  <jakub@redhat.com>
Diffstat (limited to 'linuxthreads/internals.h')
-rw-r--r--linuxthreads/internals.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/linuxthreads/internals.h b/linuxthreads/internals.h
index 3e10304c2f..68ad6c72d5 100644
--- a/linuxthreads/internals.h
+++ b/linuxthreads/internals.h
@@ -43,6 +43,17 @@
 # define THREAD_SETMEM_NC(descr, member, value) descr->member = (value)
 #endif
 
+#ifndef NOT_IN_libc
+# ifdef FLOATING_STACKS
+#  define LIBC_THREAD_GETMEM(descr, member) THREAD_GETMEM (descr, member)
+#  define LIBC_THREAD_SETMEM(descr, member, value) \
+  THREAD_SETMEM (descr, member, value)
+# else
+#  define LIBC_THREAD_GETMEM(descr, member) descr->member
+#  define LIBC_THREAD_SETMEM(descr, member, value) descr->member = (value)
+# endif
+#endif
+
 typedef void (*destr_function)(void *);
 
 struct pthread_key_struct {
@@ -430,6 +441,11 @@ extern void __linuxthreads_reap_event (void);
 /* This function is called to initialize the pthread library.  */
 extern void __pthread_initialize (void);
 
+/* TSD.  */
+extern int __pthread_internal_tsd_set (int key, const void * pointer);
+extern void * __pthread_internal_tsd_get (int key);
+extern void ** __attribute__ ((__const__))
+  __pthread_internal_tsd_address (int key);
 
 /* Sighandler wrappers.  */
 extern void __pthread_sighandler(int signo, SIGCONTEXT ctx);
@@ -504,10 +520,24 @@ struct pthread_functions
   int (*ptr_pthread_setcanceltype) (int, int *);
   void (*ptr_pthread_do_exit) (void *retval, char *currentframe);
   pthread_descr (*ptr_pthread_thread_self) (void);
+  int (*ptr_pthread_internal_tsd_set) (int key, const void * pointer);
+  void * (*ptr_pthread_internal_tsd_get) (int key);
+  void ** __attribute__ ((__const__))
+    (*ptr_pthread_internal_tsd_address) (int key);
 };
 
 /* Variable in libc.so.  */
 extern struct pthread_functions __libc_pthread_functions attribute_hidden;
 extern int * __libc_pthread_init (const struct pthread_functions *functions);
 
+#if !defined NOT_IN_libc && !defined FLOATING_STACKS
+# ifdef SHARED
+#  define thread_self() \
+  (*__libc_pthread_functions.ptr_pthread_thread_self) ()
+# else
+weak_extern (__pthread_thread_self)
+#  define thread_self() __pthread_thread_self ()
+# endif
+#endif
+
 #endif /* internals.h */