Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/ld.elf_so/arch/hppa First cut at mdtls.c for hppa.
details: https://anonhg.NetBSD.org/src/rev/f172a5e0c87a
branches: trunk
changeset: 763220:f172a5e0c87a
user: skrll <skrll%NetBSD.org@localhost>
date: Mon Mar 14 08:20:15 2011 +0000
description:
First cut at mdtls.c for hppa.
diffstat:
libexec/ld.elf_so/arch/hppa/mdtls.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diffs (22 lines):
diff -r 6ee6dba8534f -r f172a5e0c87a libexec/ld.elf_so/arch/hppa/mdtls.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/libexec/ld.elf_so/arch/hppa/mdtls.c Mon Mar 14 08:20:15 2011 +0000
@@ -0,0 +1,18 @@
+#include <sys/cdefs.h>
+
+__RCSID("$NetBSD: mdtls.c,v 1.1 2011/03/14 08:20:15 skrll Exp $");
+
+#include <sys/tls.h>
+#include "rtld.h"
+
+__dso_public void *__tls_get_addr(int[2]);
+
+void *
+__tls_get_addr(int idx[2])
+{
+ void *p;
+
+ __asm volatile("mfctl\t27 /* CR_TLS */, %0" : "=r" (p));
+
+ return _rtld_tls_get_addr(p, idx[0], idx[1]);
+}
Home |
Main Index |
Thread Index |
Old Index