projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hppa: allocate membarrier system call number
[urcu.git]
/
urcu
/
arch
/
hppa.h
diff --git
a/urcu/arch/hppa.h
b/urcu/arch/hppa.h
index 82d2a426b330869054043681ee4d281b1e85d59e..c8d4d057708e1d5fe603697b12200ca54d0d5682 100644
(file)
--- a/
urcu/arch/hppa.h
+++ b/
urcu/arch/hppa.h
@@
-32,12
+32,20
@@
extern "C" {
#include <stdlib.h>
#include <sys/time.h>
#include <stdlib.h>
#include <sys/time.h>
+/*
+ * On Linux, define the membarrier system call number if not yet available in
+ * the system headers.
+ */
+#if (defined(__linux__) && !defined(__NR_membarrier))
+#define __NR_membarrier 343
+#endif
+
#define HAS_CAA_GET_CYCLES
#define HAS_CAA_GET_CYCLES
-typedef unsigned long cycles_t;
+typedef unsigned long c
aa_c
ycles_t;
-static inline cycles_t caa_get_cycles(void)
+static inline c
aa_c
ycles_t caa_get_cycles(void)
{
{
- cycles_t cycles;
+ c
aa_c
ycles_t cycles;
asm volatile("mfctl 16, %0" : "=r" (cycles));
return cycles;
asm volatile("mfctl 16, %0" : "=r" (cycles));
return cycles;
This page took
0.025122 seconds
and
4
git commands to generate.