/kernel/liteos_m/testsuites/sample/kernel/atomic/ |
H A D | it_los_atomic_006.c | 40 UINT64 oldVal = 1; in TestCase() local 42 ret = LOS_AtomicCmpXchg64bits(&value, newVal, oldVal); in TestCase() 46 oldVal = 0; in TestCase() 47 ret = LOS_AtomicCmpXchg64bits(&value, newVal, oldVal); in TestCase() 52 oldVal = 1; in TestCase() 53 ret = LOS_AtomicCmpXchg64bits(&value, newVal, oldVal); in TestCase() 57 oldVal = 0xff; in TestCase() 58 ret = LOS_AtomicCmpXchg64bits(&value, newVal, oldVal); in TestCase() 63 oldVal = 1; in TestCase() 64 ret = LOS_AtomicCmpXchg64bits(&value, newVal, oldVal); in TestCase() [all...] |
H A D | it_los_atomic_003.c | 40 UINT32 oldVal; in TestCase() local 43 oldVal = 1; in TestCase() 44 ret = LOS_AtomicCmpXchg32bits(&value, newVal, oldVal); in TestCase() 48 oldVal = 0; in TestCase() 49 ret = LOS_AtomicCmpXchg32bits(&value, newVal, oldVal); in TestCase() 54 oldVal = 1; in TestCase() 55 ret = LOS_AtomicCmpXchg32bits(&value, newVal, oldVal); in TestCase() 59 oldVal = 0xff; in TestCase() 60 ret = LOS_AtomicCmpXchg32bits(&value, newVal, oldVal); in TestCase() 65 oldVal in TestCase() [all...] |
/kernel/liteos_a/arch/arm/arm/include/ |
H A D | los_atomic.h | 742 * This API is used to implement the atomic exchange for 8-bit variable, if the value of variable is equal to oldVal. 748 * @param oldVal [IN] The old value. 750 * @retval TRUE The previous value of the atomic variable is not equal to oldVal. 751 * @retval FALSE The previous value of the atomic variable is equal to oldVal. 756 STATIC INLINE BOOL LOS_AtomicCmpXchgByte(volatile INT8 *v, INT32 val, INT32 oldVal) in LOS_AtomicCmpXchgByte() argument 767 : "r"(v), "r"(oldVal), "r"(val) in LOS_AtomicCmpXchgByte() 771 return prevVal != oldVal; in LOS_AtomicCmpXchgByte() 779 * This API is used to implement the atomic exchange for 16-bit variable, if the value of variable is equal to oldVal. 785 * @param oldVal [IN] The old value. 787 * @retval TRUE The previous value of the atomic variable is not equal to oldVal 793 LOS_AtomicCmpXchg16bits(volatile INT16 *v, INT32 val, INT32 oldVal) LOS_AtomicCmpXchg16bits() argument 830 LOS_AtomicCmpXchg32bits(Atomic *v, INT32 val, INT32 oldVal) LOS_AtomicCmpXchg32bits() argument 867 LOS_AtomicCmpXchg64bits(Atomic64 *v, INT64 val, INT64 oldVal) LOS_AtomicCmpXchg64bits() argument [all...] |
/kernel/liteos_m/arch/arm/arm9/gcc/ |
H A D | los_arch_atomic.h | 117 STATIC INLINE BOOL ArchAtomicCmpXchg32bits(Atomic *v, INT32 val, INT32 oldVal)
in ArchAtomicCmpXchg32bits() argument 124 if (prevVal == oldVal) {
in ArchAtomicCmpXchg32bits() 129 return prevVal != oldVal;
in ArchAtomicCmpXchg32bits() 212 STATIC INLINE BOOL ArchAtomicCmpXchg64bits(Atomic64 *v, INT64 val, INT64 oldVal)
in ArchAtomicCmpXchg64bits() argument 219 if (prevVal == oldVal) {
in ArchAtomicCmpXchg64bits() 224 return prevVal != oldVal;
in ArchAtomicCmpXchg64bits()
|
/kernel/liteos_m/arch/arm/cortex-m33/gcc/NTZ/ |
H A D | los_arch_atomic.h | 162 * This API is used to implement the atomic exchange for 32-bit variable, if the value of variable is equal to oldVal.
168 * @param oldVal [IN] The old value.
170 * @retval TRUE The previous value of the atomic variable is not equal to oldVal.
171 * @retval FALSE The previous value of the atomic variable is equal to oldVal.
176 STATIC INLINE BOOL ArchAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
in ArchAtomicCmpXchg32bits() argument 189 : "r"(oldVal), "r"(val)
in ArchAtomicCmpXchg32bits() 193 return prevVal != oldVal;
in ArchAtomicCmpXchg32bits() 276 STATIC INLINE BOOL ArchAtomicCmpXchg64bits(Atomic64 *v, INT64 val, INT64 oldVal)
in ArchAtomicCmpXchg64bits() argument 283 if (prevVal == oldVal) {
in ArchAtomicCmpXchg64bits() 288 return prevVal != oldVal;
in ArchAtomicCmpXchg64bits() [all...] |
/kernel/liteos_m/arch/arm/cortex-m33/gcc/TZ/non_secure/ |
H A D | los_arch_atomic.h | 162 * This API is used to implement the atomic exchange for 32-bit variable, if the value of variable is equal to oldVal.
168 * @param oldVal [IN] The old value.
170 * @retval TRUE The previous value of the atomic variable is not equal to oldVal.
171 * @retval FALSE The previous value of the atomic variable is equal to oldVal.
176 STATIC INLINE BOOL ArchAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
in ArchAtomicCmpXchg32bits() argument 189 : "r"(oldVal), "r"(val)
in ArchAtomicCmpXchg32bits() 193 return prevVal != oldVal;
in ArchAtomicCmpXchg32bits() 276 STATIC INLINE BOOL ArchAtomicCmpXchg64bits(Atomic64 *v, INT64 val, INT64 oldVal)
in ArchAtomicCmpXchg64bits() argument 283 if (prevVal == oldVal) {
in ArchAtomicCmpXchg64bits() 288 return prevVal != oldVal;
in ArchAtomicCmpXchg64bits() [all...] |
/kernel/liteos_m/arch/arm/cortex-m33/iar/NTZ/ |
H A D | los_arch_atomic.h | 162 * This API is used to implement the atomic exchange for 32-bit variable, if the value of variable is equal to oldVal.
168 * @param oldVal [IN] The old value.
170 * @retval TRUE The previous value of the atomic variable is not equal to oldVal.
171 * @retval FALSE The previous value of the atomic variable is equal to oldVal.
176 STATIC INLINE BOOL ArchAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
in ArchAtomicCmpXchg32bits() argument 189 : "r"(v), "r"(oldVal), "r"(val)
in ArchAtomicCmpXchg32bits() 193 return prevVal != oldVal;
in ArchAtomicCmpXchg32bits() 276 STATIC INLINE BOOL ArchAtomicCmpXchg64bits(Atomic64 *v, INT64 val, INT64 oldVal)
in ArchAtomicCmpXchg64bits() argument 283 if (prevVal == oldVal) {
in ArchAtomicCmpXchg64bits() 288 return prevVal != oldVal;
in ArchAtomicCmpXchg64bits() [all...] |
/kernel/liteos_m/arch/arm/cortex-m33/iar/TZ/non_secure/ |
H A D | los_arch_atomic.h | 162 * This API is used to implement the atomic exchange for 32-bit variable, if the value of variable is equal to oldVal.
168 * @param oldVal [IN] The old value.
170 * @retval TRUE The previous value of the atomic variable is not equal to oldVal.
171 * @retval FALSE The previous value of the atomic variable is equal to oldVal.
176 STATIC INLINE BOOL ArchAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
in ArchAtomicCmpXchg32bits() argument 189 : "r"(v), "r"(oldVal), "r"(val)
in ArchAtomicCmpXchg32bits() 193 return prevVal != oldVal;
in ArchAtomicCmpXchg32bits() 276 STATIC INLINE BOOL ArchAtomicCmpXchg64bits(Atomic64 *v, INT64 val, INT64 oldVal)
in ArchAtomicCmpXchg64bits() argument 283 if (prevVal == oldVal) {
in ArchAtomicCmpXchg64bits() 288 return prevVal != oldVal;
in ArchAtomicCmpXchg64bits() [all...] |
/kernel/liteos_m/arch/arm/cortex-m4/gcc/ |
H A D | los_arch_atomic.h | 162 * This API is used to implement the atomic exchange for 32-bit variable, if the value of variable is equal to oldVal.
168 * @param oldVal [IN] The old value.
170 * @retval TRUE The previous value of the atomic variable is not equal to oldVal.
171 * @retval FALSE The previous value of the atomic variable is equal to oldVal.
176 STATIC INLINE BOOL ArchAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
in ArchAtomicCmpXchg32bits() argument 189 : "r"(oldVal), "r"(val)
in ArchAtomicCmpXchg32bits() 193 return prevVal != oldVal;
in ArchAtomicCmpXchg32bits() 276 STATIC INLINE BOOL ArchAtomicCmpXchg64bits(Atomic64 *v, INT64 val, INT64 oldVal)
in ArchAtomicCmpXchg64bits() argument 283 if (prevVal == oldVal) {
in ArchAtomicCmpXchg64bits() 288 return prevVal != oldVal;
in ArchAtomicCmpXchg64bits() [all...] |
/kernel/liteos_m/arch/arm/cortex-m4/iar/ |
H A D | los_arch_atomic.h | 162 * This API is used to implement the atomic exchange for 32-bit variable, if the value of variable is equal to oldVal.
168 * @param oldVal [IN] The old value.
170 * @retval TRUE The previous value of the atomic variable is not equal to oldVal.
171 * @retval FALSE The previous value of the atomic variable is equal to oldVal.
176 STATIC INLINE BOOL ArchAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
in ArchAtomicCmpXchg32bits() argument 189 : "r"(v), "r"(oldVal), "r"(val)
in ArchAtomicCmpXchg32bits() 193 return prevVal != oldVal;
in ArchAtomicCmpXchg32bits() 276 STATIC INLINE BOOL ArchAtomicCmpXchg64bits(Atomic64 *v, INT64 val, INT64 oldVal)
in ArchAtomicCmpXchg64bits() argument 283 if (prevVal == oldVal) {
in ArchAtomicCmpXchg64bits() 288 return prevVal != oldVal;
in ArchAtomicCmpXchg64bits() [all...] |
/kernel/liteos_m/arch/arm/cortex-m55/gcc/NTZ/ |
H A D | los_arch_atomic.h | 161 * This API is used to implement the atomic exchange for 32-bit variable, if the value of variable is equal to oldVal.
167 * @param oldVal [IN] The old value.
169 * @retval TRUE The previous value of the atomic variable is not equal to oldVal.
170 * @retval FALSE The previous value of the atomic variable is equal to oldVal.
175 STATIC INLINE BOOL ArchAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
in ArchAtomicCmpXchg32bits() argument 188 : "r"(oldVal), "r"(val)
in ArchAtomicCmpXchg32bits() 192 return prevVal != oldVal;
in ArchAtomicCmpXchg32bits() 275 STATIC INLINE BOOL ArchAtomicCmpXchg64bits(Atomic64 *v, INT64 val, INT64 oldVal)
in ArchAtomicCmpXchg64bits() argument 282 if (prevVal == oldVal) {
in ArchAtomicCmpXchg64bits() 287 return prevVal != oldVal;
in ArchAtomicCmpXchg64bits() [all...] |
/kernel/liteos_m/arch/arm/cortex-m55/gcc/TZ/non_secure/ |
H A D | los_arch_atomic.h | 162 * This API is used to implement the atomic exchange for 32-bit variable, if the value of variable is equal to oldVal.
168 * @param oldVal [IN] The old value.
170 * @retval TRUE The previous value of the atomic variable is not equal to oldVal.
171 * @retval FALSE The previous value of the atomic variable is equal to oldVal.
176 STATIC INLINE BOOL ArchAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
in ArchAtomicCmpXchg32bits() argument 189 : "r"(oldVal), "r"(val)
in ArchAtomicCmpXchg32bits() 193 return prevVal != oldVal;
in ArchAtomicCmpXchg32bits() 276 STATIC INLINE BOOL ArchAtomicCmpXchg64bits(Atomic64 *v, INT64 val, INT64 oldVal)
in ArchAtomicCmpXchg64bits() argument 283 if (prevVal == oldVal) {
in ArchAtomicCmpXchg64bits() 288 return prevVal != oldVal;
in ArchAtomicCmpXchg64bits() [all...] |
/kernel/liteos_m/arch/arm/cortex-m55/iar/NTZ/ |
H A D | los_arch_atomic.h | 162 * This API is used to implement the atomic exchange for 32-bit variable, if the value of variable is equal to oldVal.
168 * @param oldVal [IN] The old value.
170 * @retval TRUE The previous value of the atomic variable is not equal to oldVal.
171 * @retval FALSE The previous value of the atomic variable is equal to oldVal.
176 STATIC INLINE BOOL ArchAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
in ArchAtomicCmpXchg32bits() argument 189 : "r"(v), "r"(oldVal), "r"(val)
in ArchAtomicCmpXchg32bits() 193 return prevVal != oldVal;
in ArchAtomicCmpXchg32bits() 276 STATIC INLINE BOOL ArchAtomicCmpXchg64bits(Atomic64 *v, INT64 val, INT64 oldVal)
in ArchAtomicCmpXchg64bits() argument 283 if (prevVal == oldVal) {
in ArchAtomicCmpXchg64bits() 288 return prevVal != oldVal;
in ArchAtomicCmpXchg64bits() [all...] |
/kernel/liteos_m/arch/arm/cortex-m55/iar/TZ/non_secure/ |
H A D | los_arch_atomic.h | 162 * This API is used to implement the atomic exchange for 32-bit variable, if the value of variable is equal to oldVal.
168 * @param oldVal [IN] The old value.
170 * @retval TRUE The previous value of the atomic variable is not equal to oldVal.
171 * @retval FALSE The previous value of the atomic variable is equal to oldVal.
176 STATIC INLINE BOOL ArchAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
in ArchAtomicCmpXchg32bits() argument 189 : "r"(v), "r"(oldVal), "r"(val)
in ArchAtomicCmpXchg32bits() 193 return prevVal != oldVal;
in ArchAtomicCmpXchg32bits() 276 STATIC INLINE BOOL ArchAtomicCmpXchg64bits(Atomic64 *v, INT64 val, INT64 oldVal)
in ArchAtomicCmpXchg64bits() argument 283 if (prevVal == oldVal) {
in ArchAtomicCmpXchg64bits() 288 return prevVal != oldVal;
in ArchAtomicCmpXchg64bits() [all...] |
/kernel/liteos_m/arch/arm/cortex-m7/gcc/ |
H A D | los_arch_atomic.h | 162 * This API is used to implement the atomic exchange for 32-bit variable, if the value of variable is equal to oldVal.
168 * @param oldVal [IN] The old value.
170 * @retval TRUE The previous value of the atomic variable is not equal to oldVal.
171 * @retval FALSE The previous value of the atomic variable is equal to oldVal.
176 STATIC INLINE BOOL ArchAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
in ArchAtomicCmpXchg32bits() argument 189 : "r"(oldVal), "r"(val)
in ArchAtomicCmpXchg32bits() 193 return prevVal != oldVal;
in ArchAtomicCmpXchg32bits() 276 STATIC INLINE BOOL ArchAtomicCmpXchg64bits(Atomic64 *v, INT64 val, INT64 oldVal)
in ArchAtomicCmpXchg64bits() argument 283 if (prevVal == oldVal) {
in ArchAtomicCmpXchg64bits() 288 return prevVal != oldVal;
in ArchAtomicCmpXchg64bits() [all...] |
/kernel/liteos_m/arch/arm/cortex-m7/iar/ |
H A D | los_arch_atomic.h | 162 * This API is used to implement the atomic exchange for 32-bit variable, if the value of variable is equal to oldVal.
168 * @param oldVal [IN] The old value.
170 * @retval TRUE The previous value of the atomic variable is not equal to oldVal.
171 * @retval FALSE The previous value of the atomic variable is equal to oldVal.
176 STATIC INLINE BOOL ArchAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
in ArchAtomicCmpXchg32bits() argument 189 : "r"(v), "r"(oldVal), "r"(val)
in ArchAtomicCmpXchg32bits() 193 return prevVal != oldVal;
in ArchAtomicCmpXchg32bits() 276 STATIC INLINE BOOL ArchAtomicCmpXchg64bits(Atomic64 *v, INT64 val, INT64 oldVal)
in ArchAtomicCmpXchg64bits() argument 283 if (prevVal == oldVal) {
in ArchAtomicCmpXchg64bits() 288 return prevVal != oldVal;
in ArchAtomicCmpXchg64bits() [all...] |
/kernel/liteos_m/arch/csky/v2/gcc/ |
H A D | los_arch_atomic.h | 166 * This API is used to implement the atomic exchange for 32-bit variable, if the value of variable is equal to oldVal.
172 * @param oldVal [IN] The old value.
174 * @retval TRUE The previous value of the atomic variable is not equal to oldVal.
175 * @retval FALSE The previous value of the atomic variable is equal to oldVal.
180 STATIC INLINE BOOL ArchAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
in ArchAtomicCmpXchg32bits() argument 193 : "r"(v), "r"(oldVal), "r"(val)
in ArchAtomicCmpXchg32bits() 197 return prevVal != oldVal;
in ArchAtomicCmpXchg32bits() 280 STATIC INLINE BOOL ArchAtomicCmpXchg64bits(Atomic64 *v, INT64 val, INT64 oldVal)
in ArchAtomicCmpXchg64bits() argument 287 if (prevVal == oldVal) {
in ArchAtomicCmpXchg64bits() 292 return prevVal != oldVal;
in ArchAtomicCmpXchg64bits() [all...] |
/kernel/liteos_m/arch/risc-v/nuclei/gcc/ |
H A D | los_arch_atomic.h | 171 * This API is used to implement the atomic exchange for 32-bit variable, if the value of variable is equal to oldVal.
177 * @param oldVal [IN] The old value.
179 * @retval TRUE The previous value of the atomic variable is not equal to oldVal.
180 * @retval FALSE The previous value of the atomic variable is equal to oldVal.
185 STATIC INLINE BOOL ArchAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
in ArchAtomicCmpXchg32bits() argument 196 : "r"(v), "r"(oldVal), "r"(val)
in ArchAtomicCmpXchg32bits() 200 return prevVal != oldVal;
in ArchAtomicCmpXchg32bits() 283 STATIC INLINE BOOL ArchAtomicCmpXchg64bits(Atomic64 *v, INT64 val, INT64 oldVal)
in ArchAtomicCmpXchg64bits() argument 290 if (prevVal == oldVal) {
in ArchAtomicCmpXchg64bits() 295 return prevVal != oldVal;
in ArchAtomicCmpXchg64bits() [all...] |
/kernel/liteos_m/arch/risc-v/riscv32/gcc/ |
H A D | los_arch_atomic.h | 171 * This API is used to implement the atomic exchange for 32-bit variable, if the value of variable is equal to oldVal.
177 * @param oldVal [IN] The old value.
179 * @retval TRUE The previous value of the atomic variable is not equal to oldVal.
180 * @retval FALSE The previous value of the atomic variable is equal to oldVal.
185 STATIC INLINE BOOL ArchAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
in ArchAtomicCmpXchg32bits() argument 196 : "r"(v), "r"(oldVal), "r"(val)
in ArchAtomicCmpXchg32bits() 200 return prevVal != oldVal;
in ArchAtomicCmpXchg32bits() 283 STATIC INLINE BOOL ArchAtomicCmpXchg64bits(Atomic64 *v, INT64 val, INT64 oldVal)
in ArchAtomicCmpXchg64bits() argument 290 if (prevVal == oldVal) {
in ArchAtomicCmpXchg64bits() 295 return prevVal != oldVal;
in ArchAtomicCmpXchg64bits() [all...] |
/kernel/liteos_m/arch/xtensa/lx6/gcc/ |
H A D | los_arch_atomic.h | 164 * This API is used to implement the atomic exchange for 32-bit variable, if the value of variable is equal to oldVal.
170 * @param oldVal [IN] The old value.
172 * @retval TRUE The previous value of the atomic variable is not equal to oldVal.
173 * @retval FALSE The previous value of the atomic variable is equal to oldVal.
178 STATIC INLINE BOOL ArchAtomicCmpXchg32bits(volatile INT32 *v, INT32 val, INT32 oldVal)
in ArchAtomicCmpXchg32bits() argument 188 : "a"(v), "a"(oldVal), "a"(val)
in ArchAtomicCmpXchg32bits() 191 return prevVal != oldVal;
in ArchAtomicCmpXchg32bits() 274 STATIC INLINE BOOL ArchAtomicCmpXchg64bits(Atomic64 *v, INT64 val, INT64 oldVal)
in ArchAtomicCmpXchg64bits() argument 281 if (prevVal == oldVal) {
in ArchAtomicCmpXchg64bits() 286 return prevVal != oldVal;
in ArchAtomicCmpXchg64bits() [all...] |
/kernel/liteos_m/arch/arm/cortex-m3/keil/ |
H A D | los_arch_atomic.h | 132 STATIC INLINE BOOL ArchAtomicCmpXchg64bits(Atomic64 *v, INT64 val, INT64 oldVal)
in ArchAtomicCmpXchg64bits() argument 139 if (prevVal == oldVal) {
in ArchAtomicCmpXchg64bits() 144 return prevVal != oldVal;
in ArchAtomicCmpXchg64bits()
|
/kernel/liteos_a/compat/posix/src/ |
H A D | pthread_cond.c | 147 INT32 oldVal, newVal; in PthreadCondValueModify() local 150 oldVal = cond->value; in PthreadCondValueModify() 151 newVal = (INT32)(((UINT32)(oldVal - COND_COUNTER_STEP) & COND_COUNTER_MASK) | flags); in PthreadCondValueModify() 152 if (LOS_AtomicCmpXchg32bits(&cond->value, newVal, oldVal) == 0) { in PthreadCondValueModify()
|
/kernel/liteos_a/syscall/ |
H A D | time_syscall.c | 557 struct itimerspec oldVal; in SysTimerSettime64() local 581 ret = timer_settime(timerID, flags, &val, oldValue ? &oldVal : NULL); in SysTimerSettime64() 588 soldValue.it_interval.tv_sec = oldVal.it_interval.tv_sec; in SysTimerSettime64() 589 soldValue.it_interval.tv_nsec = oldVal.it_interval.tv_nsec; in SysTimerSettime64() 590 soldValue.it_value.tv_sec = oldVal.it_value.tv_sec; in SysTimerSettime64() 591 soldValue.it_value.tv_nsec = oldVal.it_value.tv_nsec; in SysTimerSettime64()
|