WUT  0.1
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 
17 struct OSSpinLock
18 {
19  uint32_t owner;
20  UNKNOWN(0x4);
21  uint32_t recursion;
22  UNKNOWN(0x4);
23 };
24 CHECK_OFFSET(OSSpinLock, 0x0, owner);
25 CHECK_OFFSET(OSSpinLock, 0x8, recursion);
26 CHECK_SIZE(OSSpinLock, 0x10);
27 
28 #pragma pack(pop)
29 
30 void
31 OSInitSpinLock(OSSpinLock *spinlock);
32 
33 BOOL
34 OSAcquireSpinLock(OSSpinLock *spinlock);
35 
36 BOOL
38 
39 BOOL
41  OSTime timeout);
42 
43 BOOL
44 OSReleaseSpinLock(OSSpinLock *spinlock);
45 
46 BOOL
48 
49 BOOL
51 
52 BOOL
54  OSTime timeout);
55 
56 BOOL
58 
59 #ifdef __cplusplus
60 }
61 #endif
62 
int64_t OSTime
Definition: time.h:17
BOOL OSReleaseSpinLock(OSSpinLock *spinlock)
uint32_t recursion
Definition: spinlock.h:21
void OSInitSpinLock(OSSpinLock *spinlock)
BOOL OSTryAcquireSpinLock(OSSpinLock *spinlock)
BOOL OSUninterruptibleSpinLock_Release(OSSpinLock *spinlock)
BOOL OSUninterruptibleSpinLock_Acquire(OSSpinLock *spinlock)
int BOOL
Definition: wut_types.h:4
BOOL OSAcquireSpinLock(OSSpinLock *spinlock)
BOOL OSTryAcquireSpinLockWithTimeout(OSSpinLock *spinlock, OSTime timeout)
BOOL OSUninterruptibleSpinLock_TryAcquireWithTimeout(OSSpinLock *spinlock, OSTime timeout)
uint32_t owner
Definition: spinlock.h:19
BOOL OSUninterruptibleSpinLock_TryAcquire(OSSpinLock *spinlock)