mirror of
https://github.com/wiiu-env/wut.git
synced 2024-12-05 03:04:16 +01:00
coreinit: Add 32 bit atomic exports.
This commit is contained in:
parent
604b18faf0
commit
840d91c62e
59
include/coreinit/atomic.h
Normal file
59
include/coreinit/atomic.h
Normal file
@ -0,0 +1,59 @@
|
||||
#pragma once
|
||||
#include <wut.h>
|
||||
|
||||
/**
|
||||
* \defgroup coreinit_atomic Atomic Operations
|
||||
* \ingroup coreinit
|
||||
*
|
||||
* These functions are used for atomically operating on 32 bit values in memory.
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
BOOL
|
||||
OSCompareAndSwapAtomic(volatile uint32_t *ptr,
|
||||
uint32_t compare,
|
||||
uint32_t value);
|
||||
|
||||
BOOL
|
||||
OSCompareAndSwapAtomicEx(volatile uint32_t *ptr,
|
||||
uint32_t compare,
|
||||
uint32_t value,
|
||||
uint32_t *old);
|
||||
|
||||
uint32_t
|
||||
OSSwapAtomic(volatile uint32_t *ptr,
|
||||
uint32_t value);
|
||||
|
||||
int32_t
|
||||
OSAddAtomic(volatile int32_t *ptr,
|
||||
int32_t value);
|
||||
|
||||
uint32_t
|
||||
OSAndAtomic(volatile uint32_t *ptr,
|
||||
uint32_t value);
|
||||
|
||||
uint32_t
|
||||
OSOrAtomic(volatile uint32_t *ptr,
|
||||
uint32_t value);
|
||||
|
||||
uint32_t
|
||||
OSXorAtomic(volatile uint32_t *ptr,
|
||||
uint32_t value);
|
||||
|
||||
BOOL
|
||||
OSTestAndClearAtomic(volatile uint32_t *ptr,
|
||||
uint32_t bit);
|
||||
|
||||
BOOL
|
||||
OSTestAndSetAtomic(volatile uint32_t *ptr,
|
||||
uint32_t bit);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
@ -12,6 +12,17 @@ EXPORT(OSSetAlarmTag);
|
||||
EXPORT(OSSetAlarmUserData);
|
||||
EXPORT(OSWaitAlarm);
|
||||
|
||||
// coreinit/atomic.h
|
||||
EXPORT(OSCompareAndSwapAtomic);
|
||||
EXPORT(OSCompareAndSwapAtomicEx);
|
||||
EXPORT(OSSwapAtomic);
|
||||
EXPORT(OSAddAtomic);
|
||||
EXPORT(OSAndAtomic);
|
||||
EXPORT(OSOrAtomic);
|
||||
EXPORT(OSXorAtomic);
|
||||
EXPORT(OSTestAndClearAtomic);
|
||||
EXPORT(OSTestAndSetAtomic);
|
||||
|
||||
// coreinit/atomic64.h
|
||||
EXPORT(OSGetAtomic64);
|
||||
EXPORT(OSSetAtomic64);
|
||||
|
Loading…
Reference in New Issue
Block a user