mirror of https://github.com/ARMmbed/mbed-os.git
Update params in calls to LD/STREXW to be uint32_t
parent
106f34e2ed
commit
c5a5438256
|
@ -69,7 +69,7 @@ __STATIC_INLINE int mxc_get_lock(uint32_t *lock, uint32_t value)
|
|||
do {
|
||||
|
||||
// Return if the lock is taken by a different thread
|
||||
if(__LDREXW((volatile unsigned long *)lock) != 0) {
|
||||
if(__LDREXW((volatile uint32_t *)lock) != 0) {
|
||||
return E_BUSY;
|
||||
}
|
||||
|
||||
|
|
|
@ -80,12 +80,12 @@ __STATIC_INLINE int mxc_get_lock(uint32_t *lock, uint32_t value)
|
|||
do {
|
||||
|
||||
// Return if the lock is taken by a different thread
|
||||
if(__LDREXW((volatile unsigned long *)lock) != 0) {
|
||||
if(__LDREXW((volatile uint32_t *)lock) != 0) {
|
||||
return E_BUSY;
|
||||
}
|
||||
|
||||
// Attempt to take the lock
|
||||
} while(__STREXW(value, (volatile unsigned long *)lock) != 0);
|
||||
} while(__STREXW(value, (volatile uint32_t *)lock) != 0);
|
||||
|
||||
// Do not start any other memory access until memory barrier is complete
|
||||
__DMB();
|
||||
|
|
|
@ -130,9 +130,9 @@ static inline void atomic_set_u32(volatile uint32_t *ptr, uint32_t mask)
|
|||
{
|
||||
uint32_t newValue;
|
||||
do {
|
||||
newValue = (uint32_t)__LDREXW((volatile unsigned long *)ptr) | mask;
|
||||
newValue = (uint32_t)__LDREXW(ptr) | mask;
|
||||
|
||||
} while (__STREXW(newValue,(volatile unsigned long*) ptr));
|
||||
} while (__STREXW(newValue, ptr));
|
||||
}
|
||||
|
||||
|
||||
|
@ -140,9 +140,9 @@ static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask)
|
|||
{
|
||||
uint32_t newValue;
|
||||
do {
|
||||
newValue = (uint32_t)__LDREXW((volatile unsigned long *)ptr) &~mask;
|
||||
newValue = (uint32_t)__LDREXW(ptr) &~mask;
|
||||
|
||||
} while (__STREXW(newValue,(volatile unsigned long*) ptr));
|
||||
} while (__STREXW(newValue, ptr));
|
||||
}
|
||||
|
||||
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
|
||||
|
|
|
@ -129,9 +129,9 @@ static inline void atomic_set_u32(volatile uint32_t *ptr, uint32_t mask)
|
|||
{
|
||||
uint32_t newValue;
|
||||
do {
|
||||
newValue = (uint32_t)__LDREXW((volatile unsigned long *)ptr) | mask;
|
||||
newValue = (uint32_t)__LDREXW(ptr) | mask;
|
||||
|
||||
} while (__STREXW(newValue,(volatile unsigned long*) ptr));
|
||||
} while (__STREXW(newValue, ptr));
|
||||
}
|
||||
|
||||
|
||||
|
@ -139,9 +139,9 @@ static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask)
|
|||
{
|
||||
uint32_t newValue;
|
||||
do {
|
||||
newValue = (uint32_t)__LDREXW((volatile unsigned long *)ptr) &~mask;
|
||||
newValue = (uint32_t)__LDREXW(ptr) &~mask;
|
||||
|
||||
} while (__STREXW(newValue,(volatile unsigned long*) ptr));
|
||||
} while (__STREXW(newValue, ptr));
|
||||
}
|
||||
|
||||
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
|
||||
|
|
|
@ -129,9 +129,9 @@ static inline void atomic_set_u32(volatile uint32_t *ptr, uint32_t mask)
|
|||
{
|
||||
uint32_t newValue;
|
||||
do {
|
||||
newValue = (uint32_t)__LDREXW((volatile unsigned long *)ptr) | mask;
|
||||
newValue = (uint32_t)__LDREXW(ptr) | mask;
|
||||
|
||||
} while (__STREXW(newValue,(volatile unsigned long*) ptr));
|
||||
} while (__STREXW(newValue, ptr));
|
||||
}
|
||||
|
||||
|
||||
|
@ -139,9 +139,9 @@ static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask)
|
|||
{
|
||||
uint32_t newValue;
|
||||
do {
|
||||
newValue = (uint32_t)__LDREXW((volatile unsigned long *)ptr) &~mask;
|
||||
newValue = (uint32_t)__LDREXW(ptr) &~mask;
|
||||
|
||||
} while (__STREXW(newValue,(volatile unsigned long*) ptr));
|
||||
} while (__STREXW(newValue, ptr));
|
||||
}
|
||||
|
||||
#endif /* USE_RTOS */
|
||||
|
|
|
@ -130,9 +130,9 @@ static inline void atomic_set_u32(volatile uint32_t *ptr, uint32_t mask)
|
|||
{
|
||||
uint32_t newValue;
|
||||
do {
|
||||
newValue = (uint32_t)__LDREXW((volatile unsigned long *)ptr) | mask;
|
||||
newValue = (uint32_t)__LDREXW(ptr) | mask;
|
||||
|
||||
} while (__STREXW(newValue,(volatile unsigned long*) ptr));
|
||||
} while (__STREXW(newValue, ptr));
|
||||
}
|
||||
|
||||
|
||||
|
@ -140,9 +140,9 @@ static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask)
|
|||
{
|
||||
uint32_t newValue;
|
||||
do {
|
||||
newValue = (uint32_t)__LDREXW((volatile unsigned long *)ptr) &~mask;
|
||||
newValue = (uint32_t)__LDREXW(ptr) &~mask;
|
||||
|
||||
} while (__STREXW(newValue,(volatile unsigned long*) ptr));
|
||||
} while (__STREXW(newValue, ptr));
|
||||
}
|
||||
|
||||
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
|
||||
|
|
|
@ -132,9 +132,9 @@ static inline void atomic_set_u32(volatile uint32_t *ptr, uint32_t mask)
|
|||
{
|
||||
uint32_t newValue;
|
||||
do {
|
||||
newValue = (uint32_t)__LDREXW((volatile unsigned long *)ptr) | mask;
|
||||
newValue = (uint32_t)__LDREXW(ptr) | mask;
|
||||
|
||||
} while (__STREXW(newValue,(volatile unsigned long*) ptr));
|
||||
} while (__STREXW(newValue, ptr));
|
||||
}
|
||||
|
||||
|
||||
|
@ -142,9 +142,9 @@ static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask)
|
|||
{
|
||||
uint32_t newValue;
|
||||
do {
|
||||
newValue = (uint32_t)__LDREXW((volatile unsigned long *)ptr) &~mask;
|
||||
newValue = (uint32_t)__LDREXW(ptr) &~mask;
|
||||
|
||||
} while (__STREXW(newValue,(volatile unsigned long*) ptr));
|
||||
} while (__STREXW(newValue, ptr));
|
||||
}
|
||||
|
||||
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
|
||||
|
|
Loading…
Reference in New Issue