diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-11-06 17:19:43 -0400 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-11-09 16:35:33 -0500 |
commit | 7e2ce6bc42f1b23a9a428cc3cd57177f8472b3f7 (patch) | |
tree | 003d9bc131b4d25375e20292948cab30864f2d53 /arch | |
parent | 1e82ca830c3ad2fd057b4c4fc5243b0622526473 (diff) |
add ARM architecture-dependent files
The atomic.h file is currently only a dummy, but it is sufficient to
get basic real-time tasks to run.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/include/asm/atomic.h | 9 | ||||
-rw-r--r-- | arch/arm/include/asm/cycles.h | 23 |
2 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h new file mode 100644 index 0000000..70dbf80 --- /dev/null +++ b/arch/arm/include/asm/atomic.h | |||
@@ -0,0 +1,9 @@ | |||
1 | #ifndef ASM_ATOMIC_H | ||
2 | #define ASM_ATOMIC_H | ||
3 | |||
4 | static inline void barrier(void) | ||
5 | { | ||
6 | /* not yet implemented */ | ||
7 | } | ||
8 | |||
9 | #endif | ||
diff --git a/arch/arm/include/asm/cycles.h b/arch/arm/include/asm/cycles.h new file mode 100644 index 0000000..73632f8 --- /dev/null +++ b/arch/arm/include/asm/cycles.h | |||
@@ -0,0 +1,23 @@ | |||
1 | #ifndef ASM_CYCLES_H | ||
2 | #define ASM_CYCLES_H | ||
3 | |||
4 | typedef unsigned long cycles_t; | ||
5 | |||
6 | #define CYCLES_FMT "lu" | ||
7 | |||
8 | /* system call wrapper */ | ||
9 | int null_call(cycles_t *timestamp); | ||
10 | |||
11 | static inline cycles_t get_cycles(void) | ||
12 | { | ||
13 | cycles_t c; | ||
14 | /* On the ARM11 MPCore chips, userspace cannot access the cycle counter | ||
15 | * directly. So ask the kernel to read it instead. Eventually, this | ||
16 | * should support newer ARM chips that do allow accessing the cycle | ||
17 | * counter in userspace. | ||
18 | */ | ||
19 | null_call(&c); | ||
20 | return c; | ||
21 | } | ||
22 | |||
23 | #endif | ||