From c6180643ff0aedb6015272b68b75a4ea237c0ede Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 7 Feb 2003 09:58:39 +0000 Subject: Update. * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86. (TLS_GET_FS): New #define. (TLS_SET_FS): New #define. Correct value of __NR_set_thread_area. --- nptl/ChangeLog | 5 +++++ nptl/sysdeps/x86_64/tls.h | 19 +++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) (limited to 'nptl') diff --git a/nptl/ChangeLog b/nptl/ChangeLog index fea1c75..60c6bc2 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,5 +1,10 @@ 2003-02-07 Ulrich Drepper + * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86. + (TLS_GET_FS): New #define. + (TLS_SET_FS): New #define. + Correct value of __NR_set_thread_area. + * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file. 2003-02-06 Ulrich Drepper diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h index af4ad17..7a63944 100644 --- a/nptl/sysdeps/x86_64/tls.h +++ b/nptl/sysdeps/x86_64/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. nptl/x86_64 version. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -120,8 +120,15 @@ union user_desc_init (((tcbhead_t *) (descr))->dtv) +/* Macros to load from and store into segment registers. */ +# define TLS_GET_FS() \ + ({ int __seg; __asm ("movl %%fs, %0" : "=q" (__seg)); __seg; }) +# define TLS_SET_FS(val) \ + __asm ("movl %0, %%fs" :: "q" (val)) + + # ifndef __NR_set_thread_area -# define __NR_set_thread_area 243 +# define __NR_set_thread_area 205 # endif # ifndef TLS_FLAG_WRITABLE # define TLS_FLAG_WRITABLE 0x00000001 @@ -134,14 +141,6 @@ union user_desc_init # endif #endif -# ifdef __PIC__ -# define TLS_EBX_ARG "r" -# define TLS_LOAD_EBX "xchgl %3, %%ebx\n\t" -# else -# define TLS_EBX_ARG "b" -# define TLS_LOAD_EBX -# endif - /* 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. -- cgit v1.1