mirror of
https://github.com/drasko/codezero.git
synced 2026-01-16 21:03:16 +01:00
Now, we support thread trees which are spanning more than one level depth. Any thread can create any number of threads provided that they are under the limits which are enforced by the kernel. Also with this commit, we have almost finished supporting SHARED space thread creation in which stack and utcb space are allocated statically.
13 lines
331 B
ArmAsm
13 lines
331 B
ArmAsm
#include <l4lib/arch/asm.h>
|
|
|
|
|
|
BEGIN_PROC(setup_new_thread)
|
|
ldr r0, [sp], #-4 @ Load first argument
|
|
mov lr, pc @ Save return address
|
|
ldr pc, [sp], #-4 @ Load function pointer from stack
|
|
b l4_thread_exit @ Call l4_thread_exit for cleanup
|
|
new_thread_exit:
|
|
b new_thread_exit @ Never reaches here
|
|
END_PROC(setup_new_thread)
|
|
|