13#ifndef PSPMODULEINFO_H
14#define PSPMODULEINFO_H
49#define PSP_MODULE_INFO(name, attributes, major_version, minor_version) \
50 extern char __lib_ent_top[], __lib_ent_bottom[]; \
51 extern char __lib_stub_top[], __lib_stub_bottom[]; \
52 extern SceModuleInfo module_info \
53 __attribute__((section(".rodata.sceModuleInfo"), \
54 aligned(16), unused)) = { \
55 attributes, { minor_version, major_version }, #name, 0, _gp, \
56 __lib_ent_top, __lib_ent_bottom, \
57 __lib_stub_top, __lib_stub_bottom \
61#define PSP_MODULE_INFO(name, attributes, major_version, minor_version) \
62 extern char __lib_ent_top[], __lib_ent_bottom[]; \
63 extern char __lib_stub_top[], __lib_stub_bottom[]; \
64 SceModuleInfo module_info \
65 __attribute__((section(".rodata.sceModuleInfo"), \
66 aligned(16), unused)) = { \
67 attributes, { minor_version, major_version }, name, 0, _gp, \
68 __lib_ent_top, __lib_ent_bottom, \
69 __lib_stub_top, __lib_stub_bottom \
74#define PSP_MAIN_THREAD_PRIORITY(priority) \
75 unsigned int sce_newlib_priority = (priority)
77#define PSP_MAIN_THREAD_STACK_SIZE_KB(size_kb) \
78 unsigned int sce_newlib_stack_kb_size = (size_kb)
80#define PSP_MAIN_THREAD_ATTR(attr) \
81 unsigned int sce_newlib_attribute = (attr)
82#define PSP_MAIN_THREAD_ATTRIBUTE PSP_MAIN_THREAD_ATTR
85#define PSP_MAIN_THREAD_PARAMS(priority, size_kb, attribute) \
86 PSP_MAIN_THREAD_PRIORITY(priority); \
87 PSP_MAIN_THREAD_STACK_SIZE_KB(size_kb); \
88 PSP_MAIN_THREAD_ATTR(attribute)
91#define PSP_NO_CREATE_MAIN_THREAD() \
92 int sce_newlib_nocreate_thread_in_start = 1
95#define PSP_HEAP_SIZE_KB(size_kb) \
96 int sce_newlib_heap_kb_size = (size_kb)
99#define PSP_HEAP_THRESHOLD_SIZE_KB(size_kb) \
100 int sce_newlib_heap_threshold_kb_size = (size_kb)
103#define PSP_MAIN_THREAD_NAME(s) const char* sce_newlib_main_thread_name = (s)
106#define PSP_DISABLE_NEWLIB() \
107 void __libcglue_init(int argc, char *argv[]) {} \
108 void __libcglue_deinit() {}
111#define PSP_DISABLE_AUTOSTART_PTHREAD() \
112 void __libpthreadglue_init() {}
struct _scemoduleinfo _sceModuleInfo
const _sceModuleInfo SceModuleInfo
Definition pspmoduleinfo.h:33
PspModuleInfoAttr
Definition pspmoduleinfo.h:38
@ PSP_MODULE_NO_STOP
Definition pspmoduleinfo.h:40
@ PSP_MODULE_KERNEL
Definition pspmoduleinfo.h:43
@ PSP_MODULE_SINGLE_LOAD
Definition pspmoduleinfo.h:41
@ PSP_MODULE_USER
Definition pspmoduleinfo.h:39
@ PSP_MODULE_SINGLE_START
Definition pspmoduleinfo.h:42
Definition pspmoduleinfo.h:21
void * stub_top
Definition pspmoduleinfo.h:29
unsigned short modattribute
Definition pspmoduleinfo.h:22
unsigned char modversion[2]
Definition pspmoduleinfo.h:23
void * ent_top
Definition pspmoduleinfo.h:27
char modname[27]
Definition pspmoduleinfo.h:24
void * ent_end
Definition pspmoduleinfo.h:28
void * stub_end
Definition pspmoduleinfo.h:30
char terminal
Definition pspmoduleinfo.h:25
void * gp_value
Definition pspmoduleinfo.h:26