Changeset 145 for trunk/hal/x86_64/core/hal_atomic.c
- Timestamp:
- Jul 5, 2017, 11:05:11 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/hal_atomic.c
r105 r145 23 23 #include <hal_internal.h> 24 24 25 void hal_atomic_and( uint32_t * ptr, 26 int32_t val ) 25 void hal_atomic_and(uint32_t *ptr, int32_t val) 27 26 { 28 27 atomic_and_32((volatile uint32_t *)ptr, val); 29 28 } 30 29 31 void hal_atomic_or( uint32_t * ptr, 32 int32_t val ) 30 void hal_atomic_or(uint32_t *ptr, int32_t val) 33 31 { 34 32 atomic_or_32((volatile uint32_t *)ptr, val); 35 33 } 36 34 37 uint32_t hal_atomic_add( void * ptr, 38 int32_t val ) 35 uint32_t hal_atomic_add(void *ptr, int32_t val) 39 36 { 40 37 return atomic_add_32((volatile uint32_t *)ptr, val); 41 38 } 42 39 43 bool_t hal_atomic_cas( uint32_t * ptr, 44 uint32_t old, 45 uint32_t new ) 40 bool_t hal_atomic_cas(uint32_t *ptr, uint32_t old, uint32_t new) 46 41 { 47 42 return (atomic_cas_32((volatile uint32_t *)ptr, old, new) == old); 48 43 } 49 44 50 bool_t hal_atomic_test_set( uint32_t * ptr, 51 int32_t val ) 45 bool_t hal_atomic_test_set(uint32_t *ptr, int32_t val) 52 46 { 53 47 x86_panic((char *)__func__);
Note: See TracChangeset
for help on using the changeset viewer.