In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Changes

Jump to navigation Jump to search
604 bytes added ,  12:14, 23 April 2017
Line 95: Line 95:     
(please feel free to contribute your own findings!)
 
(please feel free to contribute your own findings!)
 +
 +
Names starting with IOS_ are official names. The rest are only educated guesses.
    
{|border=1 class="wikitable"
 
{|border=1 class="wikitable"
Line 103: Line 105:  
| 0 || int IOS_CreateThread( u32 (*proc)(void* arg), void* arg, u32* stack_top, u32 stacksize, int priority, BOOL detached) || Creates a thread (in paused state) || New threadid or error (negative value)
 
| 0 || int IOS_CreateThread( u32 (*proc)(void* arg), void* arg, u32* stack_top, u32 stacksize, int priority, BOOL detached) || Creates a thread (in paused state) || New threadid or error (negative value)
 
|-
 
|-
| 1 || int thread_join(int threadid, u32 *returned_value) || Waits for a thread to finish executing || 0 on success
+
| 1 || int JoinThread(int threadid, u32 *returned_value) || Waits for a thread to finish executing || 0 on success
 
|-
 
|-
| 2 || int thread_cancel(int threadid, u32 return_value ) || Ends a thread, called automatically when proc returns || 0 on success
+
| 2 || int CancelThread(int threadid, u32 return_value ) || Ends a thread, called automatically when proc returns || 0 on success
 
|-
 
|-
| 3 || int get_tid(void) || Get the current thread's ID || Current threadid
+
| 3 || int IOS_GetThreadId() || Get the current thread's ID || Current threadid
 
|-
 
|-
| 4 || int get_pid(void) || Get the current process's ID || Current processid
+
| 4 || int GetPid() || Get the current process's ID || Current processid
 
|-
 
|-
 
| 5 || int IOS_StartThread(int threadid) || Resume the specified thread || 0 on success
 
| 5 || int IOS_StartThread(int threadid) || Resume the specified thread || 0 on success
 
|-
 
|-
| 6 || int thread_suspend(int threadid) || Suspend the specified thread || 0 on success
+
| 6 || int SuspendThread(int threadid) || Suspend the specified thread || 0 on success
 
|-
 
|-
| 7 || int thread_yield(void) || Yield execution to any higher priority threads || 0 on success
+
| 7 || int YieldThread(void) || Yield execution to any higher priority threads || 0 on success
 
|-
 
|-
 
| 8 || int IOS_GetThreadPriority(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)
Line 127: Line 129:  
| 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
 
|-
 
|-
| d || int message_queue_send_now(int queueid, u32 message, u32 flags) || Add a message to the front of a queue || 0 on success
+
| d || int SendMessageNow(int queueid, u32 message, u32 flags) || Add a message to 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
 
| e || int IOS_ReceiveMessage(int queueid, u32 *message, u32 flags) || Fetch a message from the front of a queue || 0 on success
Line 145: Line 147:  
| 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
 
|-
 
|-
| 16 || int heap_create(void *ptr, int size) || Create a new heap at ptr of size bytes || heapid or error (negative value)
+
| 16 || int IOS_CreateHeap(void *ptr, int size) || Create a new heap at ptr of size bytes || heapid or error (negative value)
 
|-
 
|-
 
| 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
Line 151: Line 153:  
| 18 || void* IOS_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* AllocAligned(int heapid, u32 size, u32 align) || Allocate size bytes from the specified heap with the requested alignment || pointer to aligned memory
 
|-
 
|-
 
| 1a || void IOS_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 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)
 
| 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)
Line 187: Line 189:  
| 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]]  
 
|-
 
|-
| 2b || SetUID(u32 pid, u32 gid)
+
| 2b || IOSError SetUid(u32 pid, u32 uid) || Set the UID for a process (PID <= 0x13). This can only be used from the kernel or ES. || IPC_SUCCESS on success, IPC_EACCES (permission denied if current PID > 0x1) or IPC_EINVAL (invalid PID)
 
|-
 
|-
| 2c || get_hmac_queue_for_pid
+
| 2c || u32 GetUid() || Get the UID for the active process (based on the thread PID). || UID (u32)
 
|-
 
|-
| 2d || s32 SetGID(u32 pid, u16 gid)
+
| 2d || IOSError SetGid(u32 pid, u16 gid) || Set the GID for a process (PID <= 0x13). This can only be used from the kernel or ES. || IPC_SUCCESS on success, IPC_EACCES (permission denied if current PID > 0x1) or IPC_EINVAL (invalid PID)
 
|-
 
|-
| 2e || u16 GetCurrentProcessGid()  
+
| 2e || u16 GetGid() || Get the GID for the active process (based on the thread PID). || GID (u16)  
 
|-
 
|-
 
| 2f || cc_ahbMemFlush
 
| 2f || cc_ahbMemFlush
219

edits

Navigation menu