aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps')
-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
7 files changed, 19 insertions, 31 deletions
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
}