New upstream version 24.0.1+dfsg1
This commit is contained in:
parent
b14f9eae6d
commit
5a730d6ec3
842 changed files with 42245 additions and 33385 deletions
|
|
@ -30,26 +30,26 @@ static inline long os_atomic_dec_long(volatile long *val)
|
|||
|
||||
static inline long os_atomic_set_long(volatile long *ptr, long val)
|
||||
{
|
||||
return (long)_InterlockedExchange((volatile long*)ptr, (long)val);
|
||||
return (long)_InterlockedExchange((volatile long *)ptr, (long)val);
|
||||
}
|
||||
|
||||
static inline long os_atomic_load_long(const volatile long *ptr)
|
||||
{
|
||||
return (long)_InterlockedOr((volatile long*)ptr, 0);
|
||||
return (long)_InterlockedOr((volatile long *)ptr, 0);
|
||||
}
|
||||
|
||||
static inline bool os_atomic_compare_swap_long(volatile long *val,
|
||||
long old_val, long new_val)
|
||||
static inline bool os_atomic_compare_swap_long(volatile long *val, long old_val,
|
||||
long new_val)
|
||||
{
|
||||
return _InterlockedCompareExchange(val, new_val, old_val) == old_val;
|
||||
}
|
||||
|
||||
static inline bool os_atomic_set_bool(volatile bool *ptr, bool val)
|
||||
{
|
||||
return !!_InterlockedExchange8((volatile char*)ptr, (char)val);
|
||||
return !!_InterlockedExchange8((volatile char *)ptr, (char)val);
|
||||
}
|
||||
|
||||
static inline bool os_atomic_load_bool(const volatile bool *ptr)
|
||||
{
|
||||
return !!_InterlockedOr8((volatile char*)ptr, 0);
|
||||
return !!_InterlockedOr8((volatile char *)ptr, 0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue