about summary refs log tree commit diff
path: root/linuxthreads/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/sysdeps')
-rw-r--r--linuxthreads/sysdeps/alpha/tls.h10
-rw-r--r--linuxthreads/sysdeps/ia64/pt-machine.h10
-rw-r--r--linuxthreads/sysdeps/s390/s390-32/pt-machine.h10
-rw-r--r--linuxthreads/sysdeps/s390/s390-64/pt-machine.h10
-rw-r--r--linuxthreads/sysdeps/sh/pt-machine.h12
-rw-r--r--linuxthreads/sysdeps/sparc/sparc32/pt-machine.h10
-rw-r--r--linuxthreads/sysdeps/sparc/sparc64/pt-machine.h10
7 files changed, 43 insertions, 29 deletions
diff --git a/linuxthreads/sysdeps/alpha/tls.h b/linuxthreads/sysdeps/alpha/tls.h
index d93c91fc52..261e67dd0f 100644
--- a/linuxthreads/sysdeps/alpha/tls.h
+++ b/linuxthreads/sysdeps/alpha/tls.h
@@ -114,10 +114,12 @@ typedef struct
    the compiler does its job and unifies the multiple
    __builtin_thread_pointer instances.  */
 
-#define THREAD_GETMEM(descr, member) THREAD_SELF->member
-#define THREAD_GETMEM_NC(descr, member) THREAD_SELF->member
-#define THREAD_SETMEM(descr, member, value) (THREAD_SELF->member = (value))
-#define THREAD_SETMEM_NC(descr, member, value) (THREAD_SELF->member = (value))
+#define THREAD_GETMEM(descr, member) (sizeof (descr), THREAD_SELF->member)
+#define THREAD_GETMEM_NC(descr, member) (sizeof (descr), THREAD_SELF->member)
+#define THREAD_SETMEM(descr, member, value) \
+  (sizeof (descr), THREAD_SELF->member = (value))
+#define THREAD_SETMEM_NC(descr, member, value) \
+  (sizeof (descr), THREAD_SELF->member = (value))
 
 # endif	/* HAVE_TLS_SUPPORT */
 #endif /* __ASSEMBLER__ */
diff --git a/linuxthreads/sysdeps/ia64/pt-machine.h b/linuxthreads/sysdeps/ia64/pt-machine.h
index 4b88a00509..6efe66966d 100644
--- a/linuxthreads/sysdeps/ia64/pt-machine.h
+++ b/linuxthreads/sysdeps/ia64/pt-machine.h
@@ -64,10 +64,12 @@ register struct _pthread_descr_struct *__thread_self __asm__("r13");
 
 
 /* Access to data in the thread descriptor is easy.  */
-#define THREAD_GETMEM(descr, member) THREAD_SELF->member
-#define THREAD_GETMEM_NC(descr, member) THREAD_SELF->member
-#define THREAD_SETMEM(descr, member, value) THREAD_SELF->member = (value)
-#define THREAD_SETMEM_NC(descr, member, value) THREAD_SELF->member = (value)
+#define THREAD_GETMEM(descr, member) (sizeof (descr), THREAD_SELF->member)
+#define THREAD_GETMEM_NC(descr, member) (sizeof (descr), THREAD_SELF->member)
+#define THREAD_SETMEM(descr, member, value) \
+  (sizeof (descr), THREAD_SELF->member = (value))
+#define THREAD_SETMEM_NC(descr, member, value) \
+  (sizeof (descr), THREAD_SELF->member = (value))
 
 
 /* Memory barrier */
diff --git a/linuxthreads/sysdeps/s390/s390-32/pt-machine.h b/linuxthreads/sysdeps/s390/s390-32/pt-machine.h
index ee35320059..c3a8110084 100644
--- a/linuxthreads/sysdeps/s390/s390-32/pt-machine.h
+++ b/linuxthreads/sysdeps/s390/s390-32/pt-machine.h
@@ -80,10 +80,12 @@ register char * stack_pointer __asm__ ("15");
 #endif
 
 /* Access to data in the thread descriptor is easy.  */
-#define THREAD_GETMEM(descr, member) THREAD_SELF->member
-#define THREAD_GETMEM_NC(descr, member) THREAD_SELF->member
-#define THREAD_SETMEM(descr, member, value) THREAD_SELF->member = (value)
-#define THREAD_SETMEM_NC(descr, member, value) THREAD_SELF->member = (value)
+#define THREAD_GETMEM(descr, member) (sizeof (descr), THREAD_SELF->member)
+#define THREAD_GETMEM_NC(descr, member) (sizeof (descr), THREAD_SELF->member)
+#define THREAD_SETMEM(descr, member, value) \
+  (sizeof (descr), THREAD_SELF->member = (value))
+#define THREAD_SETMEM_NC(descr, member, value) \
+  (sizeof (descr), THREAD_SELF->member = (value))
 
 /* We want the OS to assign stack addresses.  */
 #define FLOATING_STACKS 1
diff --git a/linuxthreads/sysdeps/s390/s390-64/pt-machine.h b/linuxthreads/sysdeps/s390/s390-64/pt-machine.h
index c0f30789c2..5cab958cfa 100644
--- a/linuxthreads/sysdeps/s390/s390-64/pt-machine.h
+++ b/linuxthreads/sysdeps/s390/s390-64/pt-machine.h
@@ -86,10 +86,12 @@ register char * stack_pointer __asm__ ("15");
 #endif
 
 /* Access to data in the thread descriptor is easy.  */
-#define THREAD_GETMEM(descr, member) THREAD_SELF->member
-#define THREAD_GETMEM_NC(descr, member) THREAD_SELF->member
-#define THREAD_SETMEM(descr, member, value) THREAD_SELF->member = (value)
-#define THREAD_SETMEM_NC(descr, member, value) THREAD_SELF->member = (value)
+#define THREAD_GETMEM(descr, member) (sizeof (descr), THREAD_SELF->member)
+#define THREAD_GETMEM_NC(descr, member) (sizeof (descr), THREAD_SELF->member)
+#define THREAD_SETMEM(descr, member, value) \
+  (sizeof (descr), THREAD_SELF->member = (value))
+#define THREAD_SETMEM_NC(descr, member, value) \
+  (sizeof (descr), THREAD_SELF->member = (value))
 
 /* We want the OS to assign stack addresses.  */
 #define FLOATING_STACKS 1
diff --git a/linuxthreads/sysdeps/sh/pt-machine.h b/linuxthreads/sysdeps/sh/pt-machine.h
index cc3a4f2ce9..c7fcc694b1 100644
--- a/linuxthreads/sysdeps/sh/pt-machine.h
+++ b/linuxthreads/sysdeps/sh/pt-machine.h
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    SuperH version.
-   Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Niibe Yutaka <gniibe@m17n.org>.
 
@@ -68,10 +68,12 @@ struct _pthread_descr_struct;
   ({ __asm__ __volatile__("ldc %0,gbr" : : "r" (descr));})
 
 /* Access to data in the thread descriptor is easy.  */
-#define THREAD_GETMEM(descr, member) THREAD_SELF->member
-#define THREAD_GETMEM_NC(descr, member) THREAD_SELF->member
-#define THREAD_SETMEM(descr, member, value) THREAD_SELF->member = (value)
-#define THREAD_SETMEM_NC(descr, member, value) THREAD_SELF->member = (value)
+#define THREAD_GETMEM(descr, member) (sizeof (descr), THREAD_SELF->member)
+#define THREAD_GETMEM_NC(descr, member) (sizeof (descr), THREAD_SELF->member)
+#define THREAD_SETMEM(descr, member, value) \
+  (sizeof (descr), THREAD_SELF->member = (value))
+#define THREAD_SETMEM_NC(descr, member, value) \
+  (sizeof (descr), THREAD_SELF->member = (value))
 #endif /* __ASSEMBLER__ */
 
 #endif /* pt-machine.h */
diff --git a/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h b/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h
index cbfc872df2..404edf2b95 100644
--- a/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h
+++ b/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h
@@ -65,10 +65,12 @@ register struct _pthread_descr_struct *__thread_self __asm__("%g7");
 #define INIT_THREAD_SELF(descr, nr)  (__thread_self = (descr))
 
 /* Access to data in the thread descriptor is easy.  */
-#define THREAD_GETMEM(descr, member) __thread_self->member
-#define THREAD_GETMEM_NC(descr, member) __thread_self->member
-#define THREAD_SETMEM(descr, member, value) __thread_self->member = (value)
-#define THREAD_SETMEM_NC(descr, member, value) __thread_self->member = (value)
+#define THREAD_GETMEM(descr, member) (sizeof (descr), THREAD_SELF->member)
+#define THREAD_GETMEM_NC(descr, member) (sizeof (descr), THREAD_SELF->member)
+#define THREAD_SETMEM(descr, member, value) \
+  (sizeof (descr), THREAD_SELF->member = (value))
+#define THREAD_SETMEM_NC(descr, member, value) \
+  (sizeof (descr), THREAD_SELF->member = (value))
 
 /* We want the OS to assign stack addresses.  */
 #define FLOATING_STACKS 1
diff --git a/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h b/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
index 3087020e1b..291a73291c 100644
--- a/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
+++ b/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
@@ -87,10 +87,12 @@ __compare_and_swap (long int *p, long int oldval, long int newval)
 }
 
 /* Access to data in the thread descriptor is easy.  */
-#define THREAD_GETMEM(descr, member) __thread_self->member
-#define THREAD_GETMEM_NC(descr, member) __thread_self->member
-#define THREAD_SETMEM(descr, member, value) __thread_self->member = (value)
-#define THREAD_SETMEM_NC(descr, member, value) __thread_self->member = (value)
+#define THREAD_GETMEM(descr, member) (sizeof (descr), THREAD_SELF->member)
+#define THREAD_GETMEM_NC(descr, member) (sizeof (descr), THREAD_SELF->member)
+#define THREAD_SETMEM(descr, member, value) \
+  (sizeof (descr), THREAD_SELF->member = (value))
+#define THREAD_SETMEM_NC(descr, member, value) \
+  (sizeof (descr), THREAD_SELF->member = (value))
 
 /* We want the OS to assign stack addresses.  */
 #define FLOATING_STACKS 1