vitasdk
Documentation of the vitasdk
intrmgr.h
Go to the documentation of this file.
1
6#ifndef _PSP2KERN_KERNEL_INTRMGR_H_
7#define _PSP2KERN_KERNEL_INTRMGR_H_
8
10#include <psp2kern/types.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16typedef int (*SceKernelIntrHandler)(int unk, void *userCtx);
17typedef int (*SceKernelSubIntrHandler)(void *subintr_arg, void *register_arg, unsigned char intr_priority);
18
19typedef int (*SceKernelIntrOptHandlersCb1)(int intr_code, int subintr_code);
20typedef int (*SceKernelIntrOptHandlersCb2)(int intr_code, int subintr_code, void *arg);
21typedef int (*SceKernelIntrOptHandlersCb3)(int intr_code, int subintr_code, SceKernelSubIntrHandler handler, void *register_arg);
22
36
37typedef struct SceKernelIntrOptParam {
38 uint32_t size; // 0x14
39 uint32_t num;
41 uint32_t unk_C;
42 uint32_t unk_10;
45
46int ksceKernelRegisterIntrHandler(int intr_code, const char *name, int interrupt_type,
47 SceKernelIntrHandler handler, void *user_ctx, int priority, int target_cpu, SceKernelIntrOptParam *opt);
49
50int ksceKernelEnableIntr(int intr_code);
51int ksceKernelDisableIntr(int intr_code);
52
53int ksceKernelResumeIntr(int intr_code, int enabled);
54int ksceKernelSuspendIntr(int intr_code, int *enabled);
55
56int ksceKernelIsIntrPending(int intr_code);
57int ksceKernelClearIntrPending(int intr_code);
58int ksceKernelSetIntrPriority(int intr_code, int priority);
59int ksceKernelGetIntrPriority(int intr_code, int *priority);
60int ksceKernelSetIntrTarget(int intr_code, int cpu_target_list);
61int ksceKernelGetIntrTarget(int intr_code, int *cpu_target_list);
62int ksceKernelTriggerSGI(int intr_code, unsigned int target_list_filter, unsigned int cpu_target_list);
64int ksceKernelRegisterSubIntrHandler(int intr_code, int subintr_code, const char *name,
65 SceKernelSubIntrHandler handler, void *register_arg);
66int ksceKernelReleaseSubIntrHandler(int intr_code, int subintr_code);
67int ksceKernelTriggerSubIntr(int intr_code, int subintr_code, void *subintr_arg);
68int ksceKernelEnableSubIntr(int intr_code, int subintr_code);
69int ksceKernelDisableSubIntr(int intr_code, int subintr_code);
70
71int ksceKernelQueryIntrHandlerInfo(unsigned int intr_code, unsigned int a2, int a3);
72
73
74/* For backwards compatibility */
75
76#define ksceKernelMaskIntr(intr_code) ksceKernelDisableIntr(intr_code)
77#define ksceKernelSetIntrMasked(intr_code, masked) ksceKernelEnableIntr(intr_code)
78#define ksceKernelUnmaskIntr(intr_code) ksceKernelEnableIntr(intr_code)
79#define ksceKernelGetIntrMasked ksceKernelSuspendIntr
80
81
82#ifdef __cplusplus
83}
84#endif
85
86#endif /* _PSP2KERN_KERNEL_INTRMGR_H_ */
87
#define VITASDK_BUILD_ASSERT_EQ(__size__, __name__)
Definition build_utils.h:13
uint32_t unk_C
Definition intrmgr.h:41
int ksceKernelIsIntrPending(int intr_code)
SceKernelIntrOptHandlersCb1 * fptr4
Definition intrmgr.h:32
int ksceKernelClearIntrPending(int intr_code)
uint32_t size
Definition intrmgr.h:38
int ksceKernelSuspendIntr(int intr_code, int *enabled)
uint32_t size
Definition intrmgr.h:24
SceKernelIntrOptHandlersCb1 * release_subintr_cb
Definition intrmgr.h:27
SceKernelIntrOptHandlersCb3 * pre_register_subintr_cb
Definition intrmgr.h:25
int ksceKernelQueryIntrHandlerInfo(unsigned int intr_code, unsigned int a2, int a3)
int ksceKernelRegisterIntrHandler(int intr_code, const char *name, int interrupt_type, SceKernelIntrHandler handler, void *user_ctx, int priority, int target_cpu, SceKernelIntrOptParam *opt)
int ksceKernelEnableIntr(int intr_code)
int ksceKernelGetIntrPriority(int intr_code, int *priority)
int(* SceKernelIntrOptHandlersCb3)(int intr_code, int subintr_code, SceKernelSubIntrHandler handler, void *register_arg)
Definition intrmgr.h:21
int ksceKernelSetIntrTarget(int intr_code, int cpu_target_list)
SceKernelIntrOptHandlersCb1 * fptr0
Definition intrmgr.h:28
int ksceKernelIsIntrAllowedInCurrentContext(int intr_code)
int(* SceKernelSubIntrHandler)(void *subintr_arg, void *register_arg, unsigned char intr_priority)
Definition intrmgr.h:17
SceKernelIntrOptHandlersCb2 * fptr3
Definition intrmgr.h:31
int ksceKernelRegisterSubIntrHandler(int intr_code, int subintr_code, const char *name, SceKernelSubIntrHandler handler, void *register_arg)
int ksceKernelTriggerSubIntr(int intr_code, int subintr_code, void *subintr_arg)
int(* SceKernelIntrOptHandlersCb2)(int intr_code, int subintr_code, void *arg)
Definition intrmgr.h:20
int ksceKernelReleaseSubIntrHandler(int intr_code, int subintr_code)
int ksceKernelDisableSubIntr(int intr_code, int subintr_code)
int(* SceKernelIntrOptHandlersCb1)(int intr_code, int subintr_code)
Definition intrmgr.h:19
uint32_t unk_10
Definition intrmgr.h:42
SceKernelIntrOptHandlers * handlers
Definition intrmgr.h:40
int ksceKernelDisableIntr(int intr_code)
int(* SceKernelIntrHandler)(int unk, void *userCtx)
Definition intrmgr.h:16
SceKernelIntrOptHandlersCb1 * disable_subintr_cb
Definition intrmgr.h:30
int ksceKernelResumeIntr(int intr_code, int enabled)
int ksceKernelSetIntrPriority(int intr_code, int priority)
SceKernelIntrOptHandlersCb1 * fptr5
Definition intrmgr.h:33
int ksceKernelEnableSubIntr(int intr_code, int subintr_code)
int ksceKernelGetIntrTarget(int intr_code, int *cpu_target_list)
uint32_t num
Definition intrmgr.h:39
int ksceKernelTriggerSGI(int intr_code, unsigned int target_list_filter, unsigned int cpu_target_list)
int ksceKernelReleaseIntrHandler(int intr_code)
SceKernelIntrOptHandlersCb1 * enable_subintr_cb
Definition intrmgr.h:29
SceKernelIntrOptHandlersCb3 * post_register_subintr_cb
Definition intrmgr.h:26
Definition intrmgr.h:23
Definition intrmgr.h:37