vitasdk
Documentation of the vitasdk
fiber.h
Go to the documentation of this file.
1 
7 #ifndef _PSP2_FIBER_H
8 #define _PSP2_FIBER_H
9 
10 #include <vitasdk/build_utils.h>
11 #include <psp2/types.h>
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 // Error Codes
18 
19 typedef enum SceFiberErrorCode {
20  SCE_FIBER_ERROR_NULL = 0x80590001,
22  SCE_FIBER_ERROR_RANGE = 0x80590003,
25  SCE_FIBER_ERROR_STATE = 0x80590006,
26  SCE_FIBER_ERROR_BUSY = 0x80590007,
27  SCE_FIBER_ERROR_AGAIN = 0x80590008,
28  SCE_FIBER_ERROR_FATAL = 0x80590009
30 
31 typedef struct SCE_ALIGN(8) SceFiber {
32  char reserved[128];
35 
36 typedef struct SCE_ALIGN(8) SceFiberOptParam {
37  char reserved[128];
40 
41 typedef void (SceFiberEntry)(SceUInt32 argOnInitialize, SceUInt32 argOnRun);
42 
43 typedef struct SCE_ALIGN(8) SceFiberInfo {
44  SceFiberEntry* entry;
45  SceUInt32 argOnInitialize;
46  void* addrContext;
47  SceSize sizeContext;
48  char name[32];
49  unsigned padding[80];
52 
53 SceInt32 _sceFiberInitializeImpl(SceFiber* fiber, char* name, SceFiberEntry* entry, SceUInt32 argOnInitialize, void* addrContext, SceSize sizeContext, SceFiberOptParam* params);
54 
56 
58 
59 SceInt32 sceFiberRun(SceFiber* fiber, SceUInt32 argOnRunTo, SceUInt32* argOnRun);
60 
61 SceInt32 sceFiberSwitch(SceFiber* fiber, SceUInt32 argOnRunTo, SceUInt32* argOnRun);
62 
64 
66 
68 
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 #endif
74 
SceFiberInfo
Definition: fiber.h:50
SceInt32 sceFiberOptParamInitialize(SceFiberOptParam *optParam)
SceInt32 sceFiberSwitch(SceFiber *fiber, SceUInt32 argOnRunTo, SceUInt32 *argOnRun)
SceFiber
Definition: fiber.h:33
SceInt32 sceFiberGetSelf(SceFiber *fiber)
SceInt32 sceFiberRun(SceFiber *fiber, SceUInt32 argOnRunTo, SceUInt32 *argOnRun)
SceFiberErrorCode
Definition: fiber.h:19
struct SCE_ALIGN(8) SceFiber
Definition: fiber.h:31
VITASDK_BUILD_ASSERT_EQ(0x80, SceFiber)
SceInt32 sceFiberGetInfo(SceFiber *fiber, SceFiberInfo *fiberInfo)
void() SceFiberEntry(SceUInt32 argOnInitialize, SceUInt32 argOnRun)
Definition: fiber.h:41
SceInt32 sceFiberFinalize(SceFiber *fiber)
SceInt32 _sceFiberInitializeImpl(SceFiber *fiber, char *name, SceFiberEntry *entry, SceUInt32 argOnInitialize, void *addrContext, SceSize sizeContext, SceFiberOptParam *params)
SceInt32 sceFiberReturnToThread(SceUInt32 argOnReturn, SceUInt32 *argOnRun)
SceFiberOptParam
Definition: fiber.h:38
@ SCE_FIBER_ERROR_RANGE
Definition: fiber.h:22
@ SCE_FIBER_ERROR_PERMISSION
Definition: fiber.h:24
@ SCE_FIBER_ERROR_INVALID
Definition: fiber.h:23
@ SCE_FIBER_ERROR_ALIGNMENT
Definition: fiber.h:21
@ SCE_FIBER_ERROR_NULL
Definition: fiber.h:20
@ SCE_FIBER_ERROR_BUSY
Definition: fiber.h:26
@ SCE_FIBER_ERROR_FATAL
Definition: fiber.h:28
@ SCE_FIBER_ERROR_AGAIN
Definition: fiber.h:27
@ SCE_FIBER_ERROR_STATE
Definition: fiber.h:25
int32_t SceInt32
Definition: types.h:44
unsigned int SceSize
Definition: types.h:56
uint32_t SceUInt32
Definition: types.h:45