Add the missing architecture specific functions to provide support for
the hppa/PA-RISC architecture:
- the processor internal time stamp counter (Control Register CR16) is
used to get high-performance/low-latency cycle counts
- gcc provides the necessary built-in atomic functions on hppa (which in
turn uses the light-weigth atomic locking syscall-interface of the
Linux kernel)
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
[aarch64], [ARCHTYPE="gcc"],
[mips*], [ARCHTYPE="mips"],
[tile*], [ARCHTYPE="gcc"],
+ [hppa*], [ARCHTYPE="hppa"],
[ARCHTYPE="unknown"]
)
--- /dev/null
+#ifndef _URCU_ARCH_HPPA_H
+#define _URCU_ARCH_HPPA_H
+
+#include <urcu/compiler.h>
+#include <urcu/config.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdlib.h>
+#include <sys/time.h>
+
+typedef unsigned long cycles_t;
+
+static inline cycles_t caa_get_cycles(void)
+{
+ cycles_t cycles;
+
+ asm volatile("mfctl 16, %0" : "=r" (cycles));
+ return cycles;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#include <urcu/arch/generic.h>
+
+#endif /* _URCU_ARCH_HPPA_H */
--- /dev/null
+#ifndef _URCU_ARCH_UATOMIC_HPPA_H
+#define _URCU_ARCH_UATOMIC_HPPA_H
+
+#include <urcu/compiler.h>
+#include <urcu/system.h>
+
+#define UATOMIC_HAS_ATOMIC_SHORT
+#include <urcu/uatomic/generic.h>
+
+#endif /* _URCU_ARCH_UATOMIC_HPPA_H */