wut  1.0.0-beta8
Wii U Toolchain
dynload.h
Go to the documentation of this file.
1 #pragma once
2 #include <wut.h>
3 #include "thread.h"
4 #include "time.h"
5 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 typedef enum OSDynLoad_Error
17 {
29 
31 {
35 
36 typedef void *OSDynLoad_Module;
37 
38 typedef OSDynLoad_Error (*OSDynLoadAllocFn)(int32_t size, int32_t align, void **outAddr);
39 typedef void (*OSDynLoadFreeFn)(void *addr);
40 
41 
49 OSDynLoad_Acquire(char const *name,
50  OSDynLoad_Module *outModule);
51 
52 
60  BOOL isData,
61  char const *name,
62  void **outAddr);
63 
64 
71 void
73 
74 
80  OSDynLoadFreeFn freeFn);
81 
82 
88  OSDynLoadFreeFn *outFreeFn);
89 
90 
96  OSDynLoadFreeFn freeFn);
97 
98 
104  OSDynLoadFreeFn *outFreeFn);
105 
106 
113  char * nameBuf,
114  int32_t * nameBufSize);
115 
121 int
123  OSDynLoad_EntryReason reason);
124 
125 #ifdef __cplusplus
126 }
127 #endif
128 
OSDynLoad_EntryReason
Definition: dynload.h:30
OSDynLoad_Error OSDynLoad_GetAllocator(OSDynLoadAllocFn *outAllocFn, OSDynLoadFreeFn *outFreeFn)
Get the allocator functions used for dynamic loading.
OSDynLoad_Error
Definition: dynload.h:16
OSDynLoad_Error OSDynLoad_SetAllocator(OSDynLoadAllocFn allocFn, OSDynLoadFreeFn freeFn)
Set the allocator functions to use for dynamic loading.
void * OSDynLoad_Module
Definition: dynload.h:36
OSDynLoad_Error OSDynLoad_SetTLSAllocator(OSDynLoadAllocFn allocFn, OSDynLoadFreeFn freeFn)
Set the allocator functions to use for thread local storage.
OSDynLoad_Error OSDynLoad_GetModuleName(OSDynLoad_Module module, char *nameBuf, int32_t *nameBufSize)
Gets the name for a given module handle.
OSDynLoad_Error(* OSDynLoadAllocFn)(int32_t size, int32_t align, void **outAddr)
Definition: dynload.h:38
OSDynLoad_Error OSDynLoad_FindExport(OSDynLoad_Module module, BOOL isData, char const *name, void **outAddr)
Retrieve the address of a function or data export from a module.
void OSDynLoad_Release(OSDynLoad_Module module)
Free a module handle returned from OSDynLoad_Acquire.
void(* OSDynLoadFreeFn)(void *addr)
Definition: dynload.h:39
OSDynLoad_Error OSDynLoad_GetTLSAllocator(OSDynLoadAllocFn *outAllocFn, OSDynLoadFreeFn *outFreeFn)
Get the allocator functions used for thread local storage.
int32_t BOOL
Definition: wut_types.h:4
int rpl_entry(OSDynLoad_Module module, OSDynLoad_EntryReason reason)
The prototype for an RPL entry point.
OSDynLoad_Error OSDynLoad_Acquire(char const *name, OSDynLoad_Module *outModule)
Load a module.