Remove WUT_LIB_HEADER_START.

This commit is contained in:
James Benton 2016-01-07 14:09:43 +00:00
parent e8b6b9b308
commit 4bebe2242d
28 changed files with 162 additions and 74 deletions

View File

@ -4,7 +4,9 @@
#include "threadqueue.h"
#include "time.h"
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef struct OSAlarm OSAlarm;
typedef struct OSAlarmLink OSAlarmLink;
@ -125,4 +127,6 @@ OSSetAlarmUserData(OSAlarm *alarm,
BOOL
OSWaitAlarm(OSAlarm *alarm);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -1,7 +1,9 @@
#pragma once
#include <wut.h>
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
uint64_t
OSGetAtomic64(uint64_t *ptr);
@ -49,4 +51,6 @@ BOOL
OSTestAndSetAtomic64(uint64_t *ptr,
uint32_t bit);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -1,7 +1,9 @@
#pragma once
#include <wut.h>
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef uint32_t MEMBaseHeapType;
typedef void *MEMHeapHandle;
@ -23,4 +25,6 @@ MEMHeapHandle
MEMSetBaseHeapHandle(MEMBaseHeapType type,
MEMHeapHandle handle);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -1,7 +1,9 @@
#pragma once
#include <wut.h>
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
void
DCInvalidateRange(void *addr,
@ -31,4 +33,6 @@ void
DCTouchRange(void *addr,
uint32_t size);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -2,7 +2,9 @@
#include <wut.h>
#include "threadqueue.h"
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef struct OSCondition OSCondition;
typedef struct OSMutex OSMutex;
@ -41,4 +43,6 @@ OSWaitCond(OSCondition *condition,
void
OSSignalCond(OSCondition *condition);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -1,7 +1,9 @@
#pragma once
#include <wut.h>
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
uint32_t
OSGetCoreCount();
@ -15,4 +17,6 @@ OSGetMainCoreId();
BOOL
OSIsMainCore();
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -1,7 +1,9 @@
#pragma once
#include <wut.h>
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
void
OSConsoleWrite(const char *msg,
@ -18,4 +20,6 @@ OSPanic(const char *file,
void
OSFatal(const char *msg);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -3,7 +3,9 @@
#include "thread.h"
#include "time.h"
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef void *OSDynLoadModule;
@ -31,4 +33,6 @@ OSDynLoad_FindExport(OSDynLoadModule module,
void
OSDynLoad_Release(OSDynLoadModule module);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -3,7 +3,9 @@
#include "thread.h"
#include "threadqueue.h"
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef struct OSEvent OSEvent;
typedef uint32_t OSEventMode;
@ -61,4 +63,6 @@ BOOL
OSWaitEventWithTimeout(OSEvent *event,
OSTime timeout);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -1,7 +1,9 @@
#pragma once
#include <wut.h>
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef uint32_t OSExceptionType;
typedef BOOL (*OSExceptionCallbackFn)(OSContext *context);
@ -34,4 +36,6 @@ OSSetExceptionCallbackEx(UNKNOWN_ARG,
OSExceptionType exceptionType,
OSExceptionCallbackFn callback);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -1,7 +1,9 @@
#pragma once
#include <wut.h>
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
void
exit(int code);
@ -9,4 +11,6 @@ exit(int code);
void
_Exit();
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -1,7 +1,9 @@
#pragma once
#include <wut.h>
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef struct MEMExpandedHeap MEMExpandedHeap;
@ -82,4 +84,6 @@ MEMGetGroupIDForMBlockExpHeap(uint8_t *addr);
MEMExpHeapDirection
MEMGetAllocDirForMBlockExpHeap(uint8_t *addr);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -2,7 +2,9 @@
#include <wut.h>
#include "threadqueue.h"
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef struct OSFastCondition OSFastCondition;
typedef struct OSFastMutex OSFastMutex;
@ -32,4 +34,6 @@ OSFastCond_Wait(OSFastCondition *condition,
void
OSFastCond_Signal(OSFastCondition *condition);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -2,7 +2,9 @@
#include <wut.h>
#include "threadqueue.h"
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef struct OSFastMutex OSFastMutex;
typedef struct OSFastMutexLink OSFastMutexLink;
@ -46,4 +48,6 @@ OSFastMutex_Unlock(OSFastMutex *mutex);
BOOL
OSFastMutex_TryLock(OSFastMutex *mutex);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -1,7 +1,9 @@
#pragma once
#include <wut.h>
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef uint32_t MEMFrameHeapFreeMode;
@ -59,4 +61,6 @@ uint32_t
MEMGetAllocatableSizeForFrmHeapEx(MEMFrameHeap *heap,
int alignment);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -1,7 +1,9 @@
#pragma once
#include <wut.h>
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
struct MEMMemoryLink
{
@ -59,4 +61,6 @@ void *
MEMGetNthListObject(MEMMEMMemoryList *list,
uint16_t n);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -1,7 +1,9 @@
#pragma once
#include <wut.h>
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef uint32_t OSMessageFlags;
@ -79,4 +81,6 @@ OSPeekMessage(OSMessageQueue *queue,
OSMessageQueue *
OSGetSystemMessageQueue();
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -2,7 +2,9 @@
#include <wut.h>
#include "threadqueue.h"
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef struct OSThread;
@ -66,4 +68,6 @@ OSUnlockMutex(OSMutex *mutex);
BOOL
OSTryLockMutex(OSMutex *mutex);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -1,7 +1,9 @@
#pragma once
#include <wut.h>
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef struct OSRendezvous OSRendezvous;
@ -27,4 +29,6 @@ OSWaitRendezvousWithTimeout(OSRendezvous *rendezvous,
uint32_t coreMask,
OSTime timeout);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -2,7 +2,9 @@
#include <wut.h>
#include "threadqueue.h"
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef struct OSSemaphore OSSemaphore;
@ -43,4 +45,6 @@ OSWaitSemaphore(OSSemaphore *semaphore);
int32_t
OSTryWaitSemaphore(OSSemaphore *semaphore);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -2,7 +2,9 @@
#include <wut.h>
#include "time.h"
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef struct OSSpinLock OSSpinLock;
@ -48,4 +50,6 @@ OSUninterruptibleSpinLock_TryAcquireWithTimeout(OSSpinLock *spinlock,
BOOL
OSUninterruptibleSpinLock_Release(OSSpinLock *spinlock);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -2,7 +2,9 @@
#include <wut.h>
#include "time.h"
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef struct MPTask MPTask;
typedef struct MPTaskInfo MPTaskInfo;
@ -178,4 +180,6 @@ MPRunTasksFromTaskQ(MPTaskQueue *queue,
BOOL
MPRunTask(MPTask *task);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -3,7 +3,9 @@
#include "time.h"
#include "threadqueue.h"
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef struct OSContext OSContext;
typedef struct OSFastMutex OSFastMutex;
@ -319,4 +321,6 @@ OSWakeupThread(OSThreadQueue *queue);
void
OSYieldThread();
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -1,7 +1,9 @@
#pragma once
#include <wut.h>
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef struct OSThread OSThread;
@ -46,4 +48,6 @@ void
OSInitThreadQueueEx(OSThreadQueue *queue,
void *parent);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -1,7 +1,9 @@
#pragma once
#include <wut.h>
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef struct OSCalendarTime OSCalendarTime;
@ -44,4 +46,6 @@ void
OSTicksToCalendarTime(OSTime time,
OSCalendarTime *calendarTime);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -1,7 +1,9 @@
#pragma once
#include <wut.h>
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef struct MEMUnitHeap MEMUnitHeap;
@ -38,4 +40,6 @@ MEMCalcHeapSizeForUnitHeap(uint32_t blockSize,
uint32_t count,
int32_t alignment);
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -1,7 +1,9 @@
#pragma once
#include <wut.h>
WUT_LIB_HEADER_START
#ifdef __cplusplus
extern "C" {
#endif
typedef uint32_t GX2InitAttributes;
@ -20,4 +22,6 @@ GX2Init(uint32_t *attributes);
void
GX2Shutdown();
WUT_LIB_HEADER_END
#ifdef __cplusplus
}
#endif

View File

@ -1,23 +1,3 @@
#pragma once
#include "wut_structsize.h"
#include "wut_types.h"
#ifdef __cplusplus
#define WUT_LIB_HEADER_START \
extern "C" { \
_Pragma("pack(push, 1)")
#define WUT_LIB_HEADER_END \
_Pragma("pack(pop)") \
}
#else
#define WUT_LIB_HEADER_START \
_Pragma("pack(push, 1)")
#define WUT_LIB_HEADER_END \
_Pragma("pack(pop)")
#endif