Files
codezero/conts/userlibs/libl4/src/arch/arm/new_thread.S
Bahadir Balban 6fa4884a5a Changes since April
Clean up of build directories.
Simplifications to capability model.
2010-06-01 15:08:13 +03:00

22 lines
522 B
ArmAsm

/*
* Set up new thread's argument and call its function.
* Return would be made to thread_exit with the return code.
*
* Copyright (C) 2010 B Labs Ltd.
*
* Author: Bahadir Balban
*/
#include <l4lib/macros.h>
#include L4LIB_INC_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 thread_exit @ Call l4_thread_exit for cleanup
1:
b 1b @ Never reaches here
END_PROC(setup_new_thread)