diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-12-22 20:10:10 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-12-22 20:10:10 +0000 |
commit | a334319f6530564d22e775935d9c91663623a1b4 (patch) | |
tree | b5877475619e4c938e98757d518bb1e9cbead751 /nptl/sysdeps/sh | |
parent | 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff) | |
download | glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.xz glibc-a334319f6530564d22e775935d9c91663623a1b4.zip |
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'nptl/sysdeps/sh')
-rw-r--r-- | nptl/sysdeps/sh/jmpbuf-unwind.h | 31 | ||||
-rw-r--r-- | nptl/sysdeps/sh/tcb-offsets.sym | 1 | ||||
-rw-r--r-- | nptl/sysdeps/sh/tls.h | 47 |
3 files changed, 34 insertions, 45 deletions
diff --git a/nptl/sysdeps/sh/jmpbuf-unwind.h b/nptl/sysdeps/sh/jmpbuf-unwind.h new file mode 100644 index 0000000000..cf6d25f041 --- /dev/null +++ b/nptl/sysdeps/sh/jmpbuf-unwind.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <setjmp.h> +#include <stdint.h> +#include <unwind.h> + +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) + +#define _JMPBUF_UNWINDS_ADJ(jmpbuf, address, adj) \ + ((uintptr_t) (address) - (adj) < (uintptr_t) (jmpbuf)[0].__regs[7] - (adj)) + +/* We use the normal lobngjmp for unwinding. */ +#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val) diff --git a/nptl/sysdeps/sh/tcb-offsets.sym b/nptl/sysdeps/sh/tcb-offsets.sym index 4ad866335b..539789a817 100644 --- a/nptl/sysdeps/sh/tcb-offsets.sym +++ b/nptl/sysdeps/sh/tcb-offsets.sym @@ -9,4 +9,3 @@ 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 2873fe73a8..db490ab7ee 100644 --- a/nptl/sysdeps/sh/tls.h +++ b/nptl/sysdeps/sh/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/SH version. - Copyright (C) 2003, 2005, 2007 Free Software Foundation, Inc. + Copyright (C) 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 @@ -23,7 +23,6 @@ # include <dl-sysdep.h> #ifndef __ASSEMBLER__ -# include <stdbool.h> # include <stddef.h> # include <stdint.h> @@ -31,17 +30,13 @@ typedef union dtv { size_t counter; - struct - { - void *val; - bool is_static; - } pointer; + void *pointer; } dtv_t; typedef struct { dtv_t *dtv; - uintptr_t pointer_guard; + void *private; } tcbhead_t; # define TLS_MULTIPLE_THREADS_IN_TCB 1 @@ -140,42 +135,6 @@ 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;}) - -/* Get and set the global scope generation counter in struct pthread. */ -#define THREAD_GSCOPE_FLAG_UNUSED 0 -#define THREAD_GSCOPE_FLAG_USED 1 -#define THREAD_GSCOPE_FLAG_WAIT 2 -#define THREAD_GSCOPE_RESET_FLAG() \ - do \ - { int __res \ - = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ - THREAD_GSCOPE_FLAG_UNUSED); \ - if (__res == THREAD_GSCOPE_FLAG_WAIT) \ - lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \ - } \ - while (0) -#define THREAD_GSCOPE_SET_FLAG() \ - do \ - { \ - THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ - atomic_write_barrier (); \ - } \ - while (0) -#define THREAD_GSCOPE_WAIT() \ - GL(dl_wait_lookup_done) () - #endif /* __ASSEMBLER__ */ #endif /* tls.h */ |