diff options
author | Roland McGrath <roland@gnu.org> | 2003-02-16 03:55:27 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2003-02-16 03:55:27 +0000 |
commit | b0104b6f8d369692d0ca8f265b631a87df7eaeed (patch) | |
tree | 555ffba82bc5007faae6c14b52a648d050e09b7d /sysdeps/mach/hurd/tls.h | |
parent | 8321ef15ae777fc7e7a0716e2e931adb099f310a (diff) | |
download | glibc-b0104b6f8d369692d0ca8f265b631a87df7eaeed.tar.gz glibc-b0104b6f8d369692d0ca8f265b631a87df7eaeed.tar.xz glibc-b0104b6f8d369692d0ca8f265b631a87df7eaeed.zip |
* mach/errsystems.awk: Include <errno.h> in generated output.
Diffstat (limited to 'sysdeps/mach/hurd/tls.h')
-rw-r--r-- | sysdeps/mach/hurd/tls.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sysdeps/mach/hurd/tls.h b/sysdeps/mach/hurd/tls.h index f550ed3a51..bc15b4dab6 100644 --- a/sysdeps/mach/hurd/tls.h +++ b/sysdeps/mach/hurd/tls.h @@ -20,7 +20,12 @@ #ifndef _TLS_H #define _TLS_H -#ifdef HAVE_TLS_SUPPORT +#if defined HAVE_TLS_SUPPORT && !defined ASSEMBLER + +# include <stddef.h> +# include <mach/mig_errors.h> +# include <mach.h> + /* Type for the dtv. */ typedef union dtv @@ -38,6 +43,7 @@ typedef struct thread_t self; /* This thread's control port. */ } tcbhead_t; + /* This is the size of the initial TCB. */ # define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) @@ -50,6 +56,17 @@ typedef struct /* Alignment requirements for the TCB. */ # define TLS_TCB_ALIGN TLS_INIT_TCB_ALIGN /* XXX */ + +/* Install the dtv pointer. The pointer passed is to the element with + index -1 which contain the length. */ +# define INSTALL_DTV(descr, dtvp) \ + ((tcbhead_t *) (descr))->dtv = (dtvp) + 1 + +/* Return dtv of given thread descriptor. */ +# define GET_DTV(descr) \ + (((tcbhead_t *) (descr))->dtv) + #endif /* HAVE_TLS_SUPPORT */ + #endif /* tls.h */ |