diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-12-20 18:05:57 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2005-12-20 18:05:57 +0000 |
commit | 2bf037b4e8e189e910a41744d79404b94235ab8b (patch) | |
tree | ec0234c3f56396c982e3ed5a77780423502a111f /nptl | |
parent | 20a911071d1cfaf7d20d088efe9ede27c5809c09 (diff) | |
download | glibc-2bf037b4e8e189e910a41744d79404b94235ab8b.tar.gz |
Updated to fedora-glibc-20051220T1751cvs/fedora-glibc-2_3_90-21
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/ChangeLog | 7 | ||||
-rw-r--r-- | nptl/sysdeps/sh/tcb-offsets.sym | 1 | ||||
-rw-r--r-- | nptl/sysdeps/sh/tls.h | 15 |
3 files changed, 22 insertions, 1 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 2b42d258c9..cc4fc0ec5d 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,10 @@ +2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp> + + * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD. + * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard. + (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD, + THREAD_COPY_POINTER_GUARD): Define. + 2005-12-19 Jakub Jelinek <jakub@redhat.com> * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's diff --git a/nptl/sysdeps/sh/tcb-offsets.sym b/nptl/sysdeps/sh/tcb-offsets.sym index 539789a817..4ad866335b 100644 --- a/nptl/sysdeps/sh/tcb-offsets.sym +++ b/nptl/sysdeps/sh/tcb-offsets.sym @@ -9,3 +9,4 @@ CLEANUP_JMP_BUF offsetof (struct pthread, cleanup_jmp_buf) MULTIPLE_THREADS_OFFSET offsetof (struct pthread, header.multiple_threads) TLS_PRE_TCB_SIZE sizeof (struct pthread) MUTEX_FUTEX offsetof (pthread_mutex_t, __data.__lock) +POINTER_GUARD offsetof (tcbhead_t, pointer_guard) diff --git a/nptl/sysdeps/sh/tls.h b/nptl/sysdeps/sh/tls.h index e883bae993..49d105518a 100644 --- a/nptl/sysdeps/sh/tls.h +++ b/nptl/sysdeps/sh/tls.h @@ -41,7 +41,7 @@ typedef union dtv typedef struct { dtv_t *dtv; - void *private; + uintptr_t pointer_guard; } tcbhead_t; # define TLS_MULTIPLE_THREADS_IN_TCB 1 @@ -140,6 +140,19 @@ typedef struct # define THREAD_SETMEM_NC(descr, member, idx, value) \ descr->member[idx] = (value) +#define THREAD_GET_POINTER_GUARD() \ + ({ tcbhead_t *__tcbp; \ + __asm __volatile ("stc gbr,%0" : "=r" (__tcbp)); \ + __tcbp->pointer_guard;}) + #define THREAD_SET_POINTER_GUARD(value) \ + ({ tcbhead_t *__tcbp; \ + __asm __volatile ("stc gbr,%0" : "=r" (__tcbp)); \ + __tcbp->pointer_guard = (value);}) +#define THREAD_COPY_POINTER_GUARD(descr) \ + ({ tcbhead_t *__tcbp; \ + __asm __volatile ("stc gbr,%0" : "=r" (__tcbp)); \ + ((tcbhead_t *) (descr + 1))->pointer_guard = __tcbp->pointer_guard;}) + #endif /* __ASSEMBLER__ */ #endif /* tls.h */ |