2002-07-30 Roland McGrath <roland@redhat.com>
authorroland <roland>
Fri, 2 Aug 2002 03:31:56 +0000 (03:31 +0000)
committerroland <roland>
Fri, 2 Aug 2002 03:31:56 +0000 (03:31 +0000)
* sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
(INSTALL_NEW_DTV, GET_DTV): Likewise.
* sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.

linuxthreads/sysdeps/sh/tls.h

index e8cf504..7dc4040 100644 (file)
@@ -73,16 +73,16 @@ typedef struct
 /* 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
+  ((tcbhead_t *) (descr))->dtv = dtvp + 1
 
 /* Install new dtv for current thread.  */
 # define INSTALL_NEW_DTV(dtv) \
   ({ struct _pthread_descr_struct *__descr;                                  \
-     THREAD_SETMEM (__descr, p_header.data.dtvp, dtv); })
+     THREAD_SETMEM (__descr, p_header.data.dtvp, (dtv)); })
 
 /* Return dtv of given thread descriptor.  */
 # define GET_DTV(descr) \
-  (((tcbhead_t *) descr)->dtv)
+  (((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
@@ -94,7 +94,7 @@ typedef struct
     tcbhead_t *head = _descr;                                                \
                                                                              \
     head->tcb = _descr;                                                              \
-    /* For now the thread descriptor is at the same address.  */                     \
+    /* For now the thread descriptor is at the same address.  */             \
     head->self = _descr;                                                     \
                                                                              \
     asm ("ldc %0,gbr" : : "r" (_descr));                                     \