Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/ia32/src/fibril.S

    rd6f9fff re74b24f  
    2727#
    2828
    29 #include <abi/asmtool.h>
    3029#include <libarch/fibril_context.h>
    3130
    3231.text
     32
     33.global context_save
     34.global context_restore
    3335
    3436## Save current CPU context
     
    3739# pointed by the 1st argument. Returns 1 in EAX.
    3840#
    39 FUNCTION_BEGIN(context_save)
     41context_save:
    4042        movl 0(%esp), %eax  # the caller's return %eip
    4143        movl 4(%esp), %edx  # address of the context variable to save context to
     
    5658        incl %eax
    5759        ret
    58 FUNCTION_END(context_save)
    5960
    6061## Restore saved CPU context
     
    6364# pointed by the 1st argument. Returns 0 in EAX.
    6465#
    65 FUNCTION_BEGIN(context_restore)
     66context_restore:
    6667        movl 4(%esp), %eax  # address of the context variable to restore context from
    6768       
     
    7778       
    7879        # set thread local storage
     80        pushl %edx
    7981        movl CONTEXT_OFFSET_TLS(%eax), %edx     # Set arg1 to TLS addr
    80         movl %edx, %gs:0
     82        movl $1, %eax                           # Syscall SYS_TLS_SET
     83        int $0x30
     84        popl %edx
    8185       
    8286        xorl %eax, %eax         # context_restore returns 0
    8387        ret
    84 FUNCTION_END(context_restore)
    8588
Note: See TracChangeset for help on using the changeset viewer.