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

Changes

Jump to navigation Jump to search
572 bytes added ,  02:08, 1 April 2015
→‎Functions: Added main thread functions
Line 19: Line 19:  
|<code>void ICInvalidateRange(void *addr, size_t length);</code>  
 
|<code>void ICInvalidateRange(void *addr, size_t length);</code>  
 
|Invalidate the specified instruction cache blocks
 
|Invalidate the specified instruction cache blocks
 +
|}
 +
 +
===Dynamic Linking===
 +
{| class="wikitable"
 +
!Name
 +
!Prototype
 +
!Description
 +
|-
 +
|OSDynLoad_Acquire
 +
|<code>void OSDynLoad_Acquire(const char *rplname, uint32_t *handle);</code>
 +
|Acquire a handle to an RPL by name
 +
|-
 +
|OSDynLoad_FindExport
 +
|<code>void OSDynLoad_FindExport(uint32_t handle, bool isdata, const char *symname, void **address);</code>
 +
|Get a symbol address from a loaded RPL
 
|}
 
|}
   Line 39: Line 54:  
|-
 
|-
 
|__os_snprintf
 
|__os_snprintf
|<code>int __os_snprintf(char *buf, size_t n, const char *format, ... )</code>  
+
|<code>int __os_snprintf(char *buf, size_t n, const char *format, ... );</code>  
 
|Format a string and place it in a buffer (just like [http://www.cplusplus.com/reference/cstdio/snprintf/ snprintf()])
 
|Format a string and place it in a buffer (just like [http://www.cplusplus.com/reference/cstdio/snprintf/ snprintf()])
 
|}
 
|}
   −
===Dynamic Linking===
+
===Threads===
 
{| class="wikitable"
 
{| class="wikitable"
 
!Name
 
!Name
Line 49: Line 64:  
!Description
 
!Description
 
|-
 
|-
|OSDynLoad_Acquire
+
|OSCreateThread
|<code>void OSDynLoad_Acquire(const char *rplname, uint32_t *handle);</code>  
+
|<code>bool OSCreateThread(OSThread *thread, void (*entry)(int,void*), int argc, void *args, void *stack, size_t stack_size, int32_t priority, int16_t affinity);</code>  
|Acquire a handle to an RPL by name
+
|Create a (initially-paused) thread that starts at the specified entry point
 +
|-
 +
|OSResumeThread
 +
|<code>void OSResumeThread(OSThread *thread);</code>
 +
|Resume a paused thread, causing it to be scheduled
 
|-
 
|-
|OSDynLoad_FindExport
+
|OSYieldThread
|<code>void OSDynLoad_FindExport(uint32_t handle, bool isdata, const char *symname, void **address);</code>  
+
|<code>void OSYieldThread();</code>
|Get a symbol address from a loaded RPL
+
|Yield control of the CPU, allowing another thread to run
 
|}
 
|}
203

edits

Navigation menu