From 15094943050eb9a564f409323070e50b40f78816 Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Fri, 11 Nov 2016 21:52:05 -0600 Subject: add s390x port --- arch/s390x/pthread_arch.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 arch/s390x/pthread_arch.h (limited to 'arch/s390x/pthread_arch.h') diff --git a/arch/s390x/pthread_arch.h b/arch/s390x/pthread_arch.h new file mode 100644 index 00000000..bd90016d --- /dev/null +++ b/arch/s390x/pthread_arch.h @@ -0,0 +1,14 @@ +static inline struct pthread *__pthread_self() +{ + struct pthread *self; + __asm__ __volatile__ ( + "ear %0, %%a0\n" + "sllg %0, %0, 32\n" + "ear %0, %%a1\n" + : "=r"(self)); + return self; +} + +#define TP_ADJ(p) (p) + +#define MC_PC psw.addr -- cgit v1.2.1