vitasdk
Documentation of the vitasdk
fiber.h
Go to the documentation of this file.
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
14extern "C" {
15#endif
16
17// Error Codes
18
30
31typedef struct SCE_ALIGN(8) SceFiber {
32 char reserved[128];
35
36typedef struct SCE_ALIGN(8) SceFiberOptParam {
37 char reserved[128];
40
41typedef void (SceFiberEntry)(SceUInt32 argOnInitialize, SceUInt32 argOnRun);
42
43typedef 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
53SceInt32 _sceFiberInitializeImpl(SceFiber* fiber, char* name, SceFiberEntry* entry, SceUInt32 argOnInitialize, void* addrContext, SceSize sizeContext, SceFiberOptParam* params);
54
56
58
59SceInt32 sceFiberRun(SceFiber* fiber, SceUInt32 argOnRunTo, SceUInt32* argOnRun);
60
61SceInt32 sceFiberSwitch(SceFiber* fiber, SceUInt32 argOnRunTo, SceUInt32* argOnRun);
62
64
66
68
69
70#ifdef __cplusplus
71}
72#endif
73#endif
74
#define VITASDK_BUILD_ASSERT_EQ(__size__, __name__)
Definition build_utils.h:13
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
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