summaryrefslogtreecommitdiff
path: root/software/smp/atomic.h
diff options
context:
space:
mode:
authorNathaniel Graff <nathaniel.graff@sifive.com>2019-03-07 09:29:05 -0800
committerNathaniel Graff <nathaniel.graff@sifive.com>2019-03-07 09:29:05 -0800
commitd9c3fba928162e7a89349f8b160eb479ad41cbea (patch)
tree258c5e97139d68ccb4a760d7ca0fffa231bf392c /software/smp/atomic.h
parentf695df295da82c8ef801906ad8b00b0e8afa7502 (diff)
Remove legacy examples
Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
Diffstat (limited to 'software/smp/atomic.h')
-rw-r--r--software/smp/atomic.h29
1 files changed, 0 insertions, 29 deletions
diff --git a/software/smp/atomic.h b/software/smp/atomic.h
deleted file mode 100644
index 074c6a2..0000000
--- a/software/smp/atomic.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef SIFIVE_ATOMIC_H
-#define SIFIVE_ATOMIC_H
-
-#define ATOMIC_INIT(x) \
- { \
- .counter = (x), \
- }
-
-typedef struct {
- int counter;
-} atomic_t;
-
-static inline int atomic_xchg(atomic_t *v, int n)
-{
- register int c;
-
- __asm__ __volatile__ (
- "amoswap.w.aqrl %0, %2, %1"
- : "=r" (c), "+A" (v->counter)
- : "r" (n));
- return c;
-}
-
-static inline void mb(void)
-{
- __asm__ __volatile__ ("fence");
-}
-
-#endif