From 3a366988a0077474075d8f33ad76514d2fa0c5d6 Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Fri, 24 Dec 2021 15:21:54 -0800 Subject: Standardized Formatting --- src/cpu/atomic/swap.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/cpu/atomic') diff --git a/src/cpu/atomic/swap.h b/src/cpu/atomic/swap.h index 374dd97..3584d4e 100644 --- a/src/cpu/atomic/swap.h +++ b/src/cpu/atomic/swap.h @@ -8,7 +8,8 @@ /// https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/3_Processes.html /// https://developer.arm.com/documentation/dht0008/a/arm-synchronization-primitives/practical-uses/implementing-a-semaphore?lang=en -static inline void atm_lock(unsigned long pid, unsigned long* addr) { +static inline void atm_lock(unsigned long pid, unsigned long* addr) +{ unsigned long tmp, current_lock_value; asm volatile( "1: ldrex %0, [%3]\n" @@ -23,7 +24,8 @@ static inline void atm_lock(unsigned long pid, unsigned long* addr) { : "cc"); } -static inline void atm_release(unsigned long* addr) { +static inline void atm_release(unsigned long* addr) +{ unsigned long cleared = NULL_PID; asm volatile( " dmb\n" -- cgit v1.2.1