diff options
Diffstat (limited to 'linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h')
-rw-r--r-- | linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h b/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h index a3dc26fe21..e3a153af14 100644 --- a/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h +++ b/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h @@ -1,6 +1,6 @@ /* Machine-dependent pthreads configuration and inline functions. powerpc 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 @@ -57,6 +57,16 @@ register struct _pthread_descr_struct *__thread_self __asm__("r13"); /* Initialize the thread-unique value. */ #define INIT_THREAD_SELF(descr, nr) (__thread_self = (descr)) +/* Access to data in the thread descriptor is easy. */ +#define THREAD_GETMEM(descr, member) \ + ((void) (descr), THREAD_SELF->member) +#define THREAD_GETMEM_NC(descr, member) \ + ((void) (descr), THREAD_SELF->member) +#define THREAD_SETMEM(descr, member, value) \ + ((void) (descr), THREAD_SELF->member = (value)) +#define THREAD_SETMEM_NC(descr, member, value) \ + ((void) (descr), THREAD_SELF->member = (value)) + /* Compare-and-swap for semaphores. */ /* note that test-and-set(x) is the same as !compare-and-swap(x, 0, 1) */ |