1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00
2002-02-23  Ulrich Drepper  <drepper@redhat.com>

	* csu/set-init.c: Moved to...
	* sysdeps/mach/hurd/set-init.c: ...here.  New file.
	* csu/Makefile: Don't compile set-init.
	* sysdeps/mach/hurd/Makefile: Compile set-init for subdir csu.
	* sysdeps/mach/hurd/i386/init-first.c: Call __init_misc in addition
	to __libc_init.
	* sysdeps/mach/hurd/mips/init-first.c: Likewise.
	* sysdeps/mach/hurd/powerpc/init-first.c: Likewise.
	* sysdeps/unix/sysv/linux/init-first.c: Call __init_misc instead of
	__libc_init.
	* misc/init-misc.c: Always export __init_misc.  Don't define hooks for
	__libc_subinit.
This commit is contained in:
Ulrich Drepper
2002-02-23 08:47:54 +00:00
parent e413826144
commit 557fab43bd
15 changed files with 291 additions and 85 deletions

View File

@ -32,15 +32,13 @@ typedef union dtv
typedef struct
{
void *tcb;
void *tcb; /* Pointer to the TCB. Not necessary the
thread descriptor used by libpthread. */
dtv_t *dtv;
void *self; /* Pointer to the thread descriptor. */
} tcbhead_t;
/* Get the thread descriptor definition. */
#include <linuxthreads/descr.h>
/* We can support TLS only if the floating-stack support is available. */
#if defined FLOATING_STACKS && defined HAVE_TLS_SUPPORT
@ -50,6 +48,10 @@ typedef struct
/* Signal that TLS support is available. */
# define USE_TLS 1
/* Get the thread descriptor definition. */
# include <linuxthreads/descr.h>
/* This is the size of the initial TCB. */
# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
@ -77,6 +79,10 @@ typedef struct
({ struct _pthread_descr_struct *__descr; \
THREAD_SETMEM (__descr, p_header.data.dtvp, dtv); })
/* Return dtv of given thread descriptor. */
# define GET_DTV(descr) \
(((tcbhead_t *) descr)->dtv)
/* Code to initially initialize the thread pointer. This might need
special attention since 'errno' is not yet available and if the
operation can cause a failure 'errno' must not be touched. */
@ -89,6 +95,8 @@ typedef struct
tcbhead_t *head = _descr; \
\
head->tcb = _descr; \
/* For now the thread descriptor isat the same address. */ \
head->self = _descr; \
\
asm ("pushl %%ebx\n\t" \
"movl $1, %%ebx\n\t" \