Coreinit.rpl: Difference between revisions
Jump to navigation
Jump to search
Marionumber1 (talk | contribs) →Functions: Added main cache functioms |
Marionumber1 (talk | contribs) →Internal: Link to snprintf() docs |
||
| Line 39: | Line 39: | ||
|- | |- | ||
|__os_snprintf | |__os_snprintf | ||
|<code>int __os_snprintf(char *buf, size_t | |<code>int __os_snprintf(char *buf, size_t n, const char *format, ... )</code> | ||
|Format a string and place it in a buffer | |Format a string and place it in a buffer (just like [http://www.cplusplus.com/reference/cstdio/snprintf/ snprintf()]) | ||
|} | |} | ||
Revision as of 00:57, 1 April 2015
coreinit.rpl is the the system library that provides direct access to Cafe OS services. It provides kernel calls, thread scheduling, memory management, and filesystem services. coreinit is the first RPL loaded by the loader, even before the main executable itself.
Functions
Cache
| Name | Prototype | Description |
|---|---|---|
| DCFlushRange | void DCFlushRange(void *addr, size_t length);
|
Flush the specified data cache blocks to memory |
| DCInvalidateRange | void DCInvalidateRange(void *addr, size_t length);
|
Invalidate the specified data cache blocks |
| ICInvalidateRange | void ICInvalidateRange(void *addr, size_t length);
|
Invalidate the specified instruction cache blocks |
Error
| Name | Prototype | Description |
|---|---|---|
| OSFatal | void OSFatal(const char *msg);
|
Print a message to the screen and halt the system |
Internal
| Name | Prototype | Description |
|---|---|---|
| __os_snprintf | int __os_snprintf(char *buf, size_t n, const char *format, ... )
|
Format a string and place it in a buffer (just like snprintf()) |
Dynamic Linking
| Name | Prototype | Description |
|---|---|---|
| OSDynLoad_Acquire | void OSDynLoad_Acquire(const char *rplname, uint32_t *handle);
|
Acquire a handle to an RPL by name |
| OSDynLoad_FindExport | void OSDynLoad_FindExport(uint32_t handle, bool isdata, const char *symname, void **address);
|
Get a symbol address from a loaded RPL |