Line 116:
Line 116:
| 7 || int thread_yield(void) || Yield execution to any higher priority threads || 0 on success
| 7 || int thread_yield(void) || Yield execution to any higher priority threads || 0 on success
|-
|-
−
| 8 || int thread_get_priority(int threadid) || Get the priority of the specified thread || thread's priority or error (negative value)
+
| 8 || int IOS_GetThreadPriority(int threadid) || Get the priority of the specified thread || thread's priority or error (negative value)
|-
|-
−
| 9 || int thread_set_priority(int threadid, int priority) || Set the priority of the specified thread || 0 on success
+
| 9 || int IOS_SetThreadPriority(int threadid, int priority) || Set the priority of the specified thread || 0 on success
|-
|-
| a || int IOS_CreateMessageQueue(u32 *ptr, u32 n_msgs) || Create a queue at ptr, for n_msgs messages || The queue ID
| a || int IOS_CreateMessageQueue(u32 *ptr, u32 n_msgs) || Create a queue at ptr, for n_msgs messages || The queue ID
|-
|-
−
| b || int message_queue_destroy(int queueid) || Destroy a message queue || 0 on success
+
| b || int IOS_DestroyMessageQueue(int queueid) || Destroy a message queue || 0 on success
|-
|-
| c || int IOS_SendMessage(int queueid, u32 message, u32 flags) || Add a message to the end queue || 0 on success
| c || int IOS_SendMessage(int queueid, u32 message, u32 flags) || Add a message to the end queue || 0 on success
Line 130:
Line 130:
| e || int IOS_ReceiveMessage(int queueid, u32 *message, u32 flags) || Fetch a message from the front of a queue || 0 on success
| e || int IOS_ReceiveMessage(int queueid, u32 *message, u32 flags) || Fetch a message from the front of a queue || 0 on success
|-
|-
−
| f || int RegisterEventHandler(int device, int queueid, int message) || Register queueid as a handler for interrupts generated by device (sends message to queueid when device's interrupt is triggered) || 0 on success
+
| f || int IOS_HandleEvent(int device, int queueid, int message) || Register queueid as a handler for interrupts generated by device (sends message to queueid when device's interrupt is triggered) || 0 on success
|-
|-
| 10 || int UnregisterEventHandler(int device) || Unregister handler for device || 0 on success
| 10 || int UnregisterEventHandler(int device) || Unregister handler for device || 0 on success
|-
|-
−
| 11 || int CreateTimer(int time_us, int repeat_time_us, int queueid, u32 message) || Create a timer that sends a message to a queue after the elapsed period(s) || timerid or error (negative value)
+
| 11 || int IOS_CreateTimer(int time_us, int repeat_time_us, int queueid, u32 message) || Create a timer that sends a message to a queue after the elapsed period(s) || timerid or error (negative value)
|-
|-
−
| 12 || int RestartTimer(int timerid, int time_us, int repeat_time_us) || Restart a timer using the specified period(s) || 0 on success
+
| 12 || int IOS_RestartTimer(int timerid, int time_us, int repeat_time_us) || Restart a timer using the specified period(s) || 0 on success
|-
|-
−
| 13 || int StopTimer(int timerid) || Pauses the specified timer || 0 on success
+
| 13 || int IOS_StopTimer(int timerid) || Pauses the specified timer || 0 on success
|-
|-
−
| 14 || int DestroyTimer(int timerid) || Destroys the specified timer || 0 on success
+
| 14 || int IOS_DestroyTimer(int timerid) || Destroys the specified timer || 0 on success
|-
|-
| 15 || u32 time_now() || Fetch the current value of starlet's timer || The current value of the [[Hardware/Starlet_Timer|HW_TIMER]] register
| 15 || u32 time_now() || Fetch the current value of starlet's timer || The current value of the [[Hardware/Starlet_Timer|HW_TIMER]] register
Line 148:
Line 148:
| 17 || int heap_destroy(int heapid) || Destroy the specified heap || 0 on success
| 17 || int heap_destroy(int heapid) || Destroy the specified heap || 0 on success
|-
|-
−
| 18 || void* heap_alloc(int heapid, u32 size) || Allocate size bytes from the specified heap || pointer to memory
+
| 18 || void* IOS_Alloc(int heapid, u32 size) || Allocate size bytes from the specified heap || pointer to memory
|-
|-
| 19 || void* heap_alloc_aligned(int heapid, u32 size, u32 align) || Allocate size bytes from the specified heap with the requested alignment || pointer to aligned memory
| 19 || void* heap_alloc_aligned(int heapid, u32 size, u32 align) || Allocate size bytes from the specified heap with the requested alignment || pointer to aligned memory
|-
|-
−
| 1a || void heap_free(int heapid, void *ptr) || Release allocated memory back to the heap
+
| 1a || void IOS_Free(int heapid, void *ptr) || Release allocated memory back to the heap
|-
|-
| 1b || BOOL IOS_RegisterResourceManager(const char* device, int queueid) || Registers device to the device tree, so it can be opened (from Starlet and PPC) || 0 on success
| 1b || BOOL IOS_RegisterResourceManager(const char* device, int queueid) || Registers device to the device tree, so it can be opened (from Starlet and PPC) || 0 on success
|-
|-
−
| 1c || int device_open(const char* device, int mode) || Similar to IOS_Open on PPC, except now internal to the IOS system || Returns an fd or error (negative)
+
| 1c || int IOS_Open(const char* device, int mode) || Similar to IOS_Open on PPC, except now internal to the IOS system || Returns an fd or error (negative)
|-
|-
−
| 1d || int device_close(int fd) || Close a previously opened fd || 0 on success
+
| 1d || int IOS_Close(int fd) || Close a previously opened fd || 0 on success
|-
|-
−
| 1e || int device_read(int fd, void *buf, u32 len) || Read len bytes from fd into buf || The number of bytes read or error
+
| 1e || int IOS_Read(int fd, void *buf, u32 len) || Read len bytes from fd into buf || The number of bytes read or error
|-
|-
−
| 1f || int device_write(int fd, const void *buf, u32 len) || Write len bytes to fd from buf || The number of bytes written or error
+
| 1f || int IOS_Write(int fd, const void *buf, u32 len) || Write len bytes to fd from buf || The number of bytes written or error
|-
|-
−
| 20 || int device_seek(int fd, int offset, int origin) || Seek to offset relative to origin || The new absolute offset or error
+
| 20 || int IOS_Seek(int fd, int offset, int origin) || Seek to offset relative to origin || The new absolute offset or error
|-
|-
−
| 21 || int device_ioctl(int fd, u32 request, void *input_buffer, u32 input_buffer_len, void *output_buffer, u32 output_buffer_len) || Perform the requested IOCTL || Return value from IOCTL
+
| 21 || int IOS_Ioctl(int fd, u32 request, void *input_buffer, u32 input_buffer_len, void *output_buffer, u32 output_buffer_len) || Perform the requested IOCTL || Return value from IOCTL
|-
|-
−
| 22 || int device_ioctlv(int fd, u32 request, u32 vector_count_in, u32 vector_count_out, [[IOS/struct iovec|struct iovec]] *vector) || Perform the requested IOCTL || Return value from IOCTL
+
| 22 || int IOS_Ioctlv(int fd, u32 request, u32 vector_count_in, u32 vector_count_out, [[IOS/struct iovec|struct iovec]] *vector) || Perform the requested IOCTL || Return value from IOCTL
|-
|-
−
| 23 || int device_open_async(const char* device, int mode, int queueid, ipcmessage *message) || Async implementation of device_open || 0 on success, ipcmessage is sent to the queue with the command's return value
+
| 23 || int IOS_OpenAsync(const char* device, int mode, int queueid, ipcmessage *message) || Async implementation of IOS_Open || 0 on success, ipcmessage is sent to the queue with the command's return value
|-
|-
−
| 24 || int device_close_async(int fd, int queueid, ipcmessage *message) || Async implementation of device_close || 0 on success
+
| 24 || int IOS_CloseAsync(int fd, int queueid, ipcmessage *message) || Async implementation of IOS_Close || 0 on success
|-
|-
−
| 25 || int device_read_async(int fd, void *buf, u32 len, int queueid, ipcmessage *message) || Async implementation of device_read
+
| 25 || int IOS_ReadAsync(int fd, void *buf, u32 len, int queueid, ipcmessage *message) || Async implementation of IOS_Read
|-
|-
−
| 26 || int device_write_async(int fd, const void *buf, u32 len, int queueid, ipcmessage *message) || Async implementation of device_write
+
| 26 || int IOS_WriteAsync(int fd, const void *buf, u32 len, int queueid, ipcmessage *message) || Async implementation of IOS_Write
|-
|-
−
| 27 || int device_seek_async(int fd, int offset int origin, int queueid, ipcmessage *message) || Async implementation of device_seek
+
| 27 || int IOS_SeekAsync(int fd, int offset int origin, int queueid, ipcmessage *message) || Async implementation of IOS_Seek
|-
|-
−
| 28 || int IOS_Ioctl(int fd, u32 request, void *input_buffer, u32 input_buffer_len, void *output_buffer, u32 output_buffer_len, int queueid, ipcmessage *message) || Async implementation of device_ioctl
+
| 28 || int IOS_IoctlAsync(int fd, u32 request, void *input_buffer, u32 input_buffer_len, void *output_buffer, u32 output_buffer_len, int queueid, ipcmessage *message) || Async implementation of IOS_Ioctl
|-
|-
−
| 29 || int device_ioctlv_async(int fd, u32 request, u32 vector_count_in, u32 vector_count_out, [[IOS/struct iovec|struct iovec]] *vector, int queueid, ipcmessage *message) || Async implementation of device_ioctlv
+
| 29 || int IOS_IoctlvAsync(int fd, u32 request, u32 vector_count_in, u32 vector_count_out, [[IOS/struct iovec|struct iovec]] *vector, int queueid, ipcmessage *message) || Async implementation of IOS_Ioctlv
|-
|-
| 2a || void IOS_ResourceReply( [[IOS/resource request|const struct ios_resource_request]] *request, int retval) || return from a cmd on a [[IOS|resource]]
| 2a || void IOS_ResourceReply( [[IOS/resource request|const struct ios_resource_request]] *request, int retval) || return from a cmd on a [[IOS|resource]]