From 3a3c813e08d808224c12fd0e9104aeff7c45c9a7 Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Sat, 5 Oct 2013 05:13:18 -0500 Subject: superh port --- arch/superh/pthread_arch.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 arch/superh/pthread_arch.h (limited to 'arch/superh/pthread_arch.h') diff --git a/arch/superh/pthread_arch.h b/arch/superh/pthread_arch.h new file mode 100644 index 00000000..65c389ff --- /dev/null +++ b/arch/superh/pthread_arch.h @@ -0,0 +1,11 @@ +static inline struct pthread *__pthread_self() +{ + char *self; + __asm__ __volatile__ ("stc gbr,%0" : "=r" (self) ); + return (struct pthread *) (self + 8 - sizeof(struct pthread)); +} + +#define TLS_ABOVE_TP +#define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread) - 8) + +#define CANCEL_REG_IP 17 -- cgit v1.2.1