This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: TLS on GNU/Hurd (was Re: configure.in broken.)
- From: "Alfred M. Szmidt" <ams at kemisten dot nu>
- To: Roland McGrath <roland at redhat dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Fri, 03 Sep 2004 02:26:40 +0200
- Subject: Re: TLS on GNU/Hurd (was Re: configure.in broken.)
- References: <20040902235928.48F0F19083@perdition.linnaean.org>
You forgot to add backslashes to the macros, the following patch fixes
that. No ChangeLog since this is a typo.
--- sysdeps/mach/hurd/i386/tls.h 03 Sep 2004 02:02:54 +0200 1.3
+++ sysdeps/mach/hurd/i386/tls.h 03 Sep 2004 02:18:05 +0200
@@ -111,26 +111,26 @@ _hurd_tls_init (tcbhead_t *tcb, int seco
/* 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. */
-# define TLS_INIT_TP(descr, secondcall) \
+# define TLS_INIT_TP(descr, secondcall) \
_hurd_tls_init ((tcbhead_t *) (descr), (secondcall))
# define TLS_INIT_TP_EXPENSIVE 1
/* Return the TCB address of the current thread. */
-# define THREAD_SELF \
- ({ tcbhead_t *__tcb;
+# define THREAD_SELF \
+ ({ tcbhead_t *__tcb; \
__asm__ ("movl %%gs:%c1,%0" : "=r" (__tcb) \
: "i" (offsetof (tcbhead_t, tcb))); \
__tcb;})
/* Install new dtv for current thread. */
-# define INSTALL_NEW_DTV(dtvp) \
- ({ asm volatile ("movl %0,%%gs:%P1"
+# define INSTALL_NEW_DTV(dtvp) \
+ ({ asm volatile ("movl %0,%%gs:%P1" \
: : "ir" (dtvp), "i" (offsetof (tcbhead_t, dtv))); })
/* Return the address of the dtv for the current thread. */
-# define THREAD_DTV() \
- ({ void *_dtv;
- asm ("movl %%gs:%P1,%0" : "=q" (_dtv) : "i" (offsetof (tcbhead_t, dtv)));
+# define THREAD_DTV() \
+ ({ void *_dtv; \
+ asm ("movl %%gs:%P1,%0" : "=q" (_dtv) : "i" (offsetof (tcbhead_t, dtv))); \
_dtv; })
# endif /* !ASSEMBLER */