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 
9 #include <vitasdk/build_utils.h>
10 #include <psp2kern/types.h>
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 typedef int (*SceKernelIntrHandler)(int unk, void *userCtx);
17 typedef int (*SceKernelSubIntrHandler)(void *subintr_arg, void *register_arg, unsigned char intr_priority);
18 
19 typedef int (*SceKernelIntrOptHandlersCb1)(int intr_code, int subintr_code);
20 typedef int (*SceKernelIntrOptHandlersCb2)(int intr_code, int subintr_code, void *arg);
21 typedef int (*SceKernelIntrOptHandlersCb3)(int intr_code, int subintr_code, SceKernelSubIntrHandler handler, void *register_arg);
22 
23 typedef struct SceKernelIntrOptHandlers {
24  uint32_t size; // 0x28
36 
37 typedef struct SceKernelIntrOptParam {
38  uint32_t size; // 0x14
39  uint32_t num;
41  uint32_t unk_C;
42  uint32_t unk_10;
45 
46 int ksceKernelRegisterIntrHandler(int intr_code, const char *name, int interrupt_type,
47  SceKernelIntrHandler handler, void *user_ctx, int priority, int target_cpu, SceKernelIntrOptParam *opt);
48 int ksceKernelReleaseIntrHandler(int intr_code);
49 
50 int ksceKernelEnableIntr(int intr_code);
51 int ksceKernelDisableIntr(int intr_code);
52 
53 int ksceKernelResumeIntr(int intr_code, int enabled);
54 int ksceKernelSuspendIntr(int intr_code, int *enabled);
55 
56 int ksceKernelIsIntrPending(int intr_code);
57 int ksceKernelClearIntrPending(int intr_code);
58 int ksceKernelSetIntrPriority(int intr_code, int priority);
59 int ksceKernelGetIntrPriority(int intr_code, int *priority);
60 int ksceKernelSetIntrTarget(int intr_code, int cpu_target_list);
61 int ksceKernelGetIntrTarget(int intr_code, int *cpu_target_list);
62 int ksceKernelTriggerSGI(int intr_code, unsigned int target_list_filter, unsigned int cpu_target_list);
64 int ksceKernelRegisterSubIntrHandler(int intr_code, int subintr_code, const char *name,
65  SceKernelSubIntrHandler handler, void *register_arg);
66 int ksceKernelReleaseSubIntrHandler(int intr_code, int subintr_code);
67 int ksceKernelTriggerSubIntr(int intr_code, int subintr_code, void *subintr_arg);
68 int ksceKernelEnableSubIntr(int intr_code, int subintr_code);
69 int ksceKernelDisableSubIntr(int intr_code, int subintr_code);
70 
71 int 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 
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)
VITASDK_BUILD_ASSERT_EQ(0x28, SceKernelIntrOptHandlers)
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