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

Changes

Jump to navigation Jump to search
382 bytes added ,  21:32, 7 February 2016
Line 106: Line 106:  
|<code>uint32_t *OSGetStackPointer(void);</code>
 
|<code>uint32_t *OSGetStackPointer(void);</code>
 
|Returns the r1 register(aka "sp").
 
|Returns the r1 register(aka "sp").
 +
|-
 +
|OSSwitchStack
 +
|<code>void OSSwitchStack(uint32_t *stackptr);</code>
 +
|This basically sets the current thread's r1(aka sp) to the input address, and also calls internal coreinit functions with input_param=input_stackptr. Note that this overwrites data near the start of the specified address due to stack push/pop. This will return to the address LR was set to at function entry.
 
|}
 
|}
  
340

edits

Navigation menu