Changeset 197ef43 in mainline for uspace/lib/c/arch


Ignore:
Timestamp:
2011-01-29T23:52:07Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
12573db, 40fb017
Parents:
6aef742 (diff), 47b7006 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge various cosmetic run-time support improvements

  • coding style cleanups, comments cleanups, unsigned types for bit flags, indentation, etc.
  • SYS_TASK_EXIT for proper termination of a task (optionally with udebug notification)
    • get rid of exit(), _exit(), core()
    • reimplement robust main(), exit() and abort()
    • call abort() if some part of libc initialization fails
  • add more private libc headers to reduce the namespace pollution
Location:
uspace/lib/c/arch
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/abs32le/src/entry.c

    r6aef742 r197ef43  
    3737{
    3838        __main(NULL);
    39         __exit();
    4039}
    4140
  • uspace/lib/c/arch/abs32le/src/thread_entry.c

    r6aef742 r197ef43  
    3131
    3232#include <unistd.h>
    33 #include <thread.h>
     33#include "../../../generic/private/thread.h"
    3434
    3535void __thread_entry(void)
  • uspace/lib/c/arch/amd64/src/entry.s

    r6aef742 r197ef43  
    4747        # Pass PCB pointer to __main (no operation)
    4848        call __main
    49 
    50         call __exit
  • uspace/lib/c/arch/arm32/src/entry.s

    r6aef742 r197ef43  
    4242        ldr r0, =ras_page
    4343        str r2, [r0]
    44 
     44       
    4545        #
    4646        # Create the first stack frame.
     
    5050        push {fp, ip, lr, pc}
    5151        sub fp, ip, #4
    52 
     52       
    5353        # Pass pcb_ptr to __main as the first argument (in r0)
    5454        mov r0, r1
    5555        bl __main
    56 
    57         bl __exit
    5856
    5957.data
     
    6260ras_page:
    6361        .long 0
    64 
  • uspace/lib/c/arch/ia32/src/entry.s

    r6aef742 r197ef43  
    4646        mov %ax, %fs
    4747        # Do not set %gs, it contains descriptor that can see TLS
    48 
     48       
    4949        # Detect the mechanism used for making syscalls
    5050        movl $(INTEL_CPUID_STANDARD), %eax
     
    5858        # Create the first stack frame.
    5959        #
    60         pushl $0 
     60        pushl $0
    6161        movl %esp, %ebp
    62 
     62       
    6363        # Pass the PCB pointer to __main as the first argument
    6464        pushl %edi
    6565        call __main
    66 
    67         call __exit
  • uspace/lib/c/arch/ia64/src/entry.s

    r6aef742 r197ef43  
    4040        alloc loc0 = ar.pfs, 0, 1, 2, 0
    4141        movl gp = _gp
    42 
     42       
    4343        # Pass PCB pointer as the first argument to __main
    4444        mov out0 = r2
    4545        br.call.sptk.many b0 = __main
    46 0:
    47         br.call.sptk.many b0 = __exit
  • uspace/lib/c/arch/mips32/src/entry.s

    r6aef742 r197ef43  
    5656        jal __main
    5757        nop
    58        
    59         jal __exit
    60         nop
    6158.end
    6259
  • uspace/lib/c/arch/ppc32/src/entry.s

    r6aef742 r197ef43  
    4444        stw %r3, 0(%r1)
    4545        stwu %r1, -16(%r1)
    46 
     46       
    4747        # Pass the PCB pointer to __main() as the first argument.
    4848        # The first argument is passed in r3.
    4949        mr %r3, %r6
    5050        bl __main
    51 
    52         bl __exit
  • uspace/lib/c/arch/sparc64/src/entry.s

    r6aef742 r197ef43  
    4545        flushw
    4646        add %g0, -0x7ff, %fp
    47 
     47       
    4848        # Pass pcb_ptr as the first argument to __main()
    4949        mov %i1, %o0
     
    5151        call __main
    5252        or %l7, %lo(_gp), %l7
    53 
    54         call __exit
    55         nop
Note: See TracChangeset for help on using the changeset viewer.