about summary refs log tree commit diff
path: root/arch/s390x/pthread_arch.h
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2016-11-11 21:52:05 -0600
committerRich Felker <dalias@aerifal.cx>2016-11-11 23:06:21 -0500
commit15094943050eb9a564f409323070e50b40f78816 (patch)
treef9af42d3369ee9a6ebd08bf416a99159193217a8 /arch/s390x/pthread_arch.h
parent54482898abe8d6d937ee67ea5974cd8eae859c37 (diff)
downloadmusl-15094943050eb9a564f409323070e50b40f78816.tar.gz
musl-15094943050eb9a564f409323070e50b40f78816.tar.xz
musl-15094943050eb9a564f409323070e50b40f78816.zip
add s390x port
Diffstat (limited to 'arch/s390x/pthread_arch.h')
-rw-r--r--arch/s390x/pthread_arch.h14
1 files changed, 14 insertions, 0 deletions
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