wut  1.0.0-beta8
Wii U Toolchain
spinlock.h
Go to the documentation of this file.
1 #pragma once
2 #include <wut.h>
3 #include "time.h"
4 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 typedef struct OSSpinLock OSSpinLock;
16 
18 {
19  uint32_t owner;
20  WUT_UNKNOWN_BYTES(0x4);
21  uint32_t recursion;
22  WUT_UNKNOWN_BYTES(0x4);
23 };
24 WUT_CHECK_OFFSET(OSSpinLock, 0x0, owner);
25 WUT_CHECK_OFFSET(OSSpinLock, 0x8, recursion);
26 WUT_CHECK_SIZE(OSSpinLock, 0x10);
27 
28 void
29 OSInitSpinLock(OSSpinLock *spinlock);
30 
31 BOOL
32 OSAcquireSpinLock(OSSpinLock *spinlock);
33 
34 BOOL
36 
37 BOOL
39  OSTime timeout);
40 
41 BOOL
42 OSReleaseSpinLock(OSSpinLock *spinlock);
43 
44 BOOL
46 
47 BOOL
49 
50 BOOL
52  OSTime timeout);
53 
54 BOOL
56 
57 #ifdef __cplusplus
58 }
59 #endif
60 
int64_t OSTime
Definition: time.h:18
BOOL OSReleaseSpinLock(OSSpinLock *spinlock)
struct OSSpinLock OSSpinLock
Definition: spinlock.h:15
void OSInitSpinLock(OSSpinLock *spinlock)
BOOL OSTryAcquireSpinLock(OSSpinLock *spinlock)
BOOL OSUninterruptibleSpinLock_Release(OSSpinLock *spinlock)
BOOL OSUninterruptibleSpinLock_Acquire(OSSpinLock *spinlock)
BOOL OSAcquireSpinLock(OSSpinLock *spinlock)
int32_t BOOL
Definition: wut_types.h:4
BOOL OSTryAcquireSpinLockWithTimeout(OSSpinLock *spinlock, OSTime timeout)
BOOL OSUninterruptibleSpinLock_TryAcquireWithTimeout(OSSpinLock *spinlock, OSTime timeout)
BOOL OSUninterruptibleSpinLock_TryAcquire(OSSpinLock *spinlock)
struct WUT_ALIGNAS(16) OSSpinLock
Definition: spinlock.h:17