about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-12-28 22:19:04 +0000
committerUlrich Drepper <drepper@redhat.com>2002-12-28 22:19:04 +0000
commit3b7ed8712599efbecd92f4d68398fb7a593aef75 (patch)
treed8dea4cd2be3b50dd7706387988c3ddace21dd55 /nptl
parentb25a62a8a36541b12e8452224bb2e71f83ade815 (diff)
downloadglibc-3b7ed8712599efbecd92f4d68398fb7a593aef75.tar.gz
glibc-3b7ed8712599efbecd92f4d68398fb7a593aef75.tar.xz
glibc-3b7ed8712599efbecd92f4d68398fb7a593aef75.zip
Update.
2002-12-28  Ulrich Drepper  <drepper@redhat.com>

	* misc/sys/cdefs.h (__attribute_deprecated__): New #define.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog19
-rw-r--r--nptl/sysdeps/i386/Makefile3
-rw-r--r--nptl/sysdeps/i386/tcb-offsets.sym5
-rw-r--r--nptl/sysdeps/i386/tls.h12
-rw-r--r--nptl/sysdeps/pthread/pthread.h5
-rw-r--r--nptl/sysdeps/pthread/tcb-offsets.h1
-rw-r--r--nptl/sysdeps/unix/sysv/linux/Versions5
-rw-r--r--nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c19
8 files changed, 38 insertions, 31 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 24c2fb64fb..24d9361863 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,22 @@
+2002-12-28  Jakub Jelinek  <jakub@redhat.com>
+
+	* sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
+	(SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
+	* sysdeps/i386/Makefile: New file.
+	* sysdeps/i386/tcb-offsets.sym: New file.
+	* sysdeps/pthread/tcb-offsets.h: New file.
+	* sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
+	Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
+
+	* sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
+	__register_atfork...
+	(GLIBC_2.3.2): ...here.
+
+2002-12-28  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
+	pthread_attr_setstackaddr with __attribute_deprecated__.
+
 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
 
 	* pt-system.c (system): Remove cancellation handling.
diff --git a/nptl/sysdeps/i386/Makefile b/nptl/sysdeps/i386/Makefile
new file mode 100644
index 0000000000..81bddf688c
--- /dev/null
+++ b/nptl/sysdeps/i386/Makefile
@@ -0,0 +1,3 @@
+ifeq ($(subdir),csu)
+gen-as-const-headers += tcb-offsets.sym
+endif
diff --git a/nptl/sysdeps/i386/tcb-offsets.sym b/nptl/sysdeps/i386/tcb-offsets.sym
new file mode 100644
index 0000000000..d1d0a10ee2
--- /dev/null
+++ b/nptl/sysdeps/i386/tcb-offsets.sym
@@ -0,0 +1,5 @@
+#include <sysdep.h>
+#include <tls.h>
+
+MULTIPLE_THREADS_OFFSET		offsetof (tcbhead_t, multiple_threads)
+SYSINFO_OFFSET			offsetof (tcbhead_t, sysinfo)
diff --git a/nptl/sysdeps/i386/tls.h b/nptl/sysdeps/i386/tls.h
index 4f8ddb2d28..f830db78dc 100644
--- a/nptl/sysdeps/i386/tls.h
+++ b/nptl/sysdeps/i386/tls.h
@@ -46,6 +46,9 @@ typedef struct
   uintptr_t sysinfo;
   list_t list;
 } tcbhead_t;
+
+#else /* __ASSEMBLER__ */
+# include <tcb-offsets.h>
 #endif
 
 
@@ -61,15 +64,6 @@ typedef struct
    the SSE memory functions.  */
 #define STACK_ALIGN	16
 
-/* Offset of the MULTIPLE_THREADS element in tcbhead_t.  */
-#define MULTIPLE_THREADS_OFFSET 12
-
-#ifdef NEED_DL_SYSINFO
-/* Offset of the SYSINFO element in tcbhead_t.  */
-# define SYSINFO_OFFSET 16
-#endif
-
-
 #ifndef __ASSEMBLER__
 /* Get system call information.  */
 # include <sysdep.h>
diff --git a/nptl/sysdeps/pthread/pthread.h b/nptl/sysdeps/pthread/pthread.h
index d6b0966d40..aeb3ef520e 100644
--- a/nptl/sysdeps/pthread/pthread.h
+++ b/nptl/sysdeps/pthread/pthread.h
@@ -272,14 +272,15 @@ extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
 /* Return the previously set address for the stack.  */
 extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
 				      __attr, void **__restrict __stackaddr)
-     __THROW;
+     __THROW __attribute_deprecated__;
 
 /* Set the starting address of the stack of the thread to be created.
    Depending on whether the stack grows up or down the value must either
    be higher or lower than all the address in the memory block.  The
    minimal size of the block must be PTHREAD_STACK_SIZE.  */
 extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
-				      void *__stackaddr) __THROW;
+				      void *__stackaddr)
+     __THROW __attribute_deprecated__;
 
 /* Return the currently used minimal stack size.  */
 extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
diff --git a/nptl/sysdeps/pthread/tcb-offsets.h b/nptl/sysdeps/pthread/tcb-offsets.h
new file mode 100644
index 0000000000..3fe13702ea
--- /dev/null
+++ b/nptl/sysdeps/pthread/tcb-offsets.h
@@ -0,0 +1 @@
+/* This is overridden by generated tcb-offsets.h on arches which need it.  */
diff --git a/nptl/sysdeps/unix/sysv/linux/Versions b/nptl/sysdeps/unix/sysv/linux/Versions
index 8fea097e43..d18255521c 100644
--- a/nptl/sysdeps/unix/sysv/linux/Versions
+++ b/nptl/sysdeps/unix/sysv/linux/Versions
@@ -1,6 +1,9 @@
 libc {
+  GLIBC_2.3.2 {
+    __register_atfork;
+  }
   GLIBC_PRIVATE {
-    __register_atfork; __libc_pthread_init;
+    __libc_pthread_init;
     __libc_current_sigrtmin_private; __libc_current_sigrtmax_private;
     __libc_allocate_rtsig_private;
   }
diff --git a/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c b/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
index 87c97343b0..fdda78bc20 100644
--- a/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
+++ b/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
@@ -52,23 +52,4 @@ __libc_pthread_init (ptr, reclaim, functions)
   memcpy (&__libc_pthread_functions, functions,
 	  sizeof (__libc_pthread_functions));
 #endif
-
-  /* We have a macro which is used in asm code describing data layout.
-     Make sure it does not get out of date.  */
-  if (offsetof (struct pthread, header.data.multiple_threads)
-      != MULTIPLE_THREADS_OFFSET)
-    {
-#define str_n_len(str) str, sizeof (str) - 1
-      __libc_write (STDERR_FILENO,
-		    str_n_len ("*** MULTIPLE_THREADS_OFFSET out of date\n"));
-      _exit (1);
-    }
-#ifdef SYSINFO_OFFSET
-  if (offsetof (struct pthread, header.data.sysinfo) != SYSINFO_OFFSET)
-    {
-      __libc_write (STDERR_FILENO,
-		    str_n_len ("*** SYSINFO_OFFSET out of date\n"));
-      _exit (1);
-    }
-#endif
 }