summaryrefslogtreecommitdiffstats
path: root/stacks/lwip_stack/release/lwip_helper_files/lwip/arch/atomic_32.h
diff options
context:
space:
mode:
authorcharan makkina <charan795m@gmail.com>2019-04-30 17:40:53 +0530
committercharan makkina <charan795m@gmail.com>2019-05-20 18:14:40 +0530
commita826fe833d3f2a8fe2673fa05811fe1a22baf045 (patch)
treeda11a17c46ca9b8a002a52a290628574fa3f5eda /stacks/lwip_stack/release/lwip_helper_files/lwip/arch/atomic_32.h
parent3e6bf7b64eea418c59959c18750261b815b2892c (diff)
Feature: 19.04 part 1
Change-Id: Ibba924b8deca1f246b9dcb12d89d085b6fd33046 Signed-off-by: charan makkina <charan795m@gmail.com>
Diffstat (limited to 'stacks/lwip_stack/release/lwip_helper_files/lwip/arch/atomic_32.h')
-rw-r--r--stacks/lwip_stack/release/lwip_helper_files/lwip/arch/atomic_32.h53
1 files changed, 0 insertions, 53 deletions
diff --git a/stacks/lwip_stack/release/lwip_helper_files/lwip/arch/atomic_32.h b/stacks/lwip_stack/release/lwip_helper_files/lwip/arch/atomic_32.h
deleted file mode 100644
index 15a058b..0000000
--- a/stacks/lwip_stack/release/lwip_helper_files/lwip/arch/atomic_32.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * atomic_32.h
- *
- */
-
-#ifndef ATOMIC_32_H_
-#define ATOMIC_32_H_
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
- typedef struct
- {
- volatile int counter;
- } atomic_t;
-
-#define ATOMIC_INIT(i) {(i)}
-#define atomic_read(v) (*(volatile int *)&(v)->counter)
-#define atomic_set(v, i) (((v)->counter) = (i))
-
- static inline void atomic_add (int i, atomic_t * v)
- {
- __asm__ __volatile__ (
- /*LOCK_PREFIX "addl %1,%0" */
- "addl %1,%0":"+m" (v->counter):"ir" (i));
- }
-
- static inline void atomic_sub (int i, atomic_t * v)
- {
- __asm__ __volatile__ (
- /*LOCK_PREFIX "subl %1,%0" */
- "subl %1,%0":"+m" (v->counter):"ir" (i));
- }
-
- static __inline__ void atomic_inc (atomic_t * v)
- {
- __asm__ __volatile__ (
- /*LOCK_PREFIX "incl %0" */
- "incl %0":"+m" (v->counter));
- }
-
- static __inline__ void atomic_dec (atomic_t * v)
- {
- __asm__ __volatile__ (
- /*LOCK_PREFIX "decl %0" */
- "decl %0":"+m" (v->counter));
- }
-#ifdef __cplusplus
-}
-#endif
-#endif /* ATOMIC_32_H_ */