mirror of
https://github.com/wiiu-env/wut.git
synced 2025-01-07 23:00:41 +01:00
Move OSFastCondition to it's own header file.
This commit is contained in:
parent
d58b264cab
commit
ca212889b4
39
include/coreinit/fastcondition.h
Normal file
39
include/coreinit/fastcondition.h
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <wut.h>
|
||||||
|
#include "threadqueue.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef struct OSFastCondition OSFastCondition;
|
||||||
|
typedef struct OSFastMutex OSFastMutex;
|
||||||
|
|
||||||
|
#define OS_FAST_CONDITION_TAG 0x664E6456u
|
||||||
|
|
||||||
|
struct OSFastCondition
|
||||||
|
{
|
||||||
|
uint32_t tag;
|
||||||
|
const char *name;
|
||||||
|
UNKNOWN(4);
|
||||||
|
OSThreadQueue queue;
|
||||||
|
};
|
||||||
|
CHECK_OFFSET(OSFastCondition, 0x00, tag);
|
||||||
|
CHECK_OFFSET(OSFastCondition, 0x04, name);
|
||||||
|
CHECK_OFFSET(OSFastCondition, 0x0c, queue);
|
||||||
|
CHECK_SIZE(OSFastCondition, 0x1c);
|
||||||
|
|
||||||
|
void
|
||||||
|
OSFastCond_Init(OSFastCondition *condition,
|
||||||
|
const char *name);
|
||||||
|
|
||||||
|
void
|
||||||
|
OSFastCond_Wait(OSFastCondition *condition,
|
||||||
|
OSFastMutex *mutex);
|
||||||
|
|
||||||
|
void
|
||||||
|
OSFastCond_Signal(OSFastCondition *condition);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
@ -36,20 +36,6 @@ CHECK_OFFSET(OSFastMutex, 0x0c, queue);
|
|||||||
CHECK_OFFSET(OSFastMutex, 0x14, link);
|
CHECK_OFFSET(OSFastMutex, 0x14, link);
|
||||||
CHECK_SIZE(OSFastMutex, 0x2c);
|
CHECK_SIZE(OSFastMutex, 0x2c);
|
||||||
|
|
||||||
struct OSFastCondition
|
|
||||||
{
|
|
||||||
static const uint32_t Tag = 0x664E6456;
|
|
||||||
|
|
||||||
uint32_t tag;
|
|
||||||
const char *name;
|
|
||||||
UNKNOWN(4);
|
|
||||||
OSThreadQueue queue;
|
|
||||||
};
|
|
||||||
CHECK_OFFSET(OSFastCondition, 0x00, tag);
|
|
||||||
CHECK_OFFSET(OSFastCondition, 0x04, name);
|
|
||||||
CHECK_OFFSET(OSFastCondition, 0x0c, queue);
|
|
||||||
CHECK_SIZE(OSFastCondition, 0x1c);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
OSFastMutex_Init(OSFastMutex *mutex, const char *name);
|
OSFastMutex_Init(OSFastMutex *mutex, const char *name);
|
||||||
|
|
||||||
@ -62,15 +48,6 @@ OSFastMutex_Unlock(OSFastMutex *mutex);
|
|||||||
BOOL
|
BOOL
|
||||||
OSFastMutex_TryLock(OSFastMutex *mutex);
|
OSFastMutex_TryLock(OSFastMutex *mutex);
|
||||||
|
|
||||||
void
|
|
||||||
OSFastCond_Init(OSFastCondition *condition, const char *name);
|
|
||||||
|
|
||||||
void
|
|
||||||
OSFastCond_Wait(OSFastCondition *condition, OSFastMutex *mutex);
|
|
||||||
|
|
||||||
void
|
|
||||||
OSFastCond_Signal(OSFastCondition *condition);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -76,14 +76,16 @@ EXPORT(OSSetExceptionCallbackEx);
|
|||||||
EXPORT(exit);
|
EXPORT(exit);
|
||||||
EXPORT(_Exit);
|
EXPORT(_Exit);
|
||||||
|
|
||||||
|
// coreinit/fastcondition.h
|
||||||
|
EXPORT(OSFastCond_Init);
|
||||||
|
EXPORT(OSFastCond_Wait);
|
||||||
|
EXPORT(OSFastCond_Signal);
|
||||||
|
|
||||||
// coreinit/fastmutex.h
|
// coreinit/fastmutex.h
|
||||||
EXPORT(OSFastMutex_Init);
|
EXPORT(OSFastMutex_Init);
|
||||||
EXPORT(OSFastMutex_Lock);
|
EXPORT(OSFastMutex_Lock);
|
||||||
EXPORT(OSFastMutex_Unlock);
|
EXPORT(OSFastMutex_Unlock);
|
||||||
EXPORT(OSFastMutex_TryLock);
|
EXPORT(OSFastMutex_TryLock);
|
||||||
EXPORT(OSFastCond_Init);
|
|
||||||
EXPORT(OSFastCond_Wait);
|
|
||||||
EXPORT(OSFastCond_Signal);
|
|
||||||
|
|
||||||
// coreinit/memexpandedheap.h
|
// coreinit/memexpandedheap.h
|
||||||
EXPORT(MEMCreateExpHeap);
|
EXPORT(MEMCreateExpHeap);
|
||||||
|
Loading…
Reference in New Issue
Block a user