OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [conts/] [libl4/] [src/] [arch/] [arm/] [new_thread.S.ARM] - Diff between revs 2 and 6

Show entire file | Details | Blame | View Log

Rev 2 Rev 6
?rev1line?
?rev2line?
 
/*
 
 * 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 
 
#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)
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.