From 045fcd26211f27400df0bec5d40f7b69d8af7e9b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 26 Jul 2001 01:39:53 +0000 Subject: Update. 2001-07-26 kaz Kojima * sysdeps/sh/dl-machine.h (elf_machine_load_address): Don't use multi-line strings. (FUN_ADDR, FGR_SAVE, ELF_MACHINE_RUNTIME_TRAMPOLINE): Likewise. (elf_machine_rela): Handle unaligned relocation. --- linuxthreads/sysdeps/sh/pt-machine.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'linuxthreads/sysdeps') diff --git a/linuxthreads/sysdeps/sh/pt-machine.h b/linuxthreads/sysdeps/sh/pt-machine.h index cdffece..7287dc9 100644 --- a/linuxthreads/sysdeps/sh/pt-machine.h +++ b/linuxthreads/sysdeps/sh/pt-machine.h @@ -44,3 +44,13 @@ testandset (int *spinlock) of the stack, just something somewhere in the current frame. */ #define CURRENT_STACK_FRAME stack_pointer register char * stack_pointer __asm__ ("r15"); + +/* Return the thread descriptor for the current thread. */ +struct _pthread_descr_struct; +#define THREAD_SELF \ + ({ struct _pthread_descr_struct *self; \ + __asm__("stc gbr,%0" : "=r" (self)); self;}) + +/* Initialize the thread-unique value. */ +#define INIT_THREAD_SELF(descr, nr) \ + ({ __asm__("ldc %0,gbr" : : "r" (descr));}) -- cgit v1.1