Ignore:
File:
1 edited

Legend:

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

    re74b24f rd6f9fff  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <libarch/fibril_context.h>
    3031
    3132.text
    32 
    33 .global context_save
    34 .global context_restore
    3533
    3634## Save current CPU context
     
    3937# pointed by the 1st argument. Returns 1 in EAX.
    4038#
    41 context_save:
     39FUNCTION_BEGIN(context_save)
    4240        movl 0(%esp), %eax  # the caller's return %eip
    4341        movl 4(%esp), %edx  # address of the context variable to save context to
     
    5856        incl %eax
    5957        ret
     58FUNCTION_END(context_save)
    6059
    6160## Restore saved CPU context
     
    6463# pointed by the 1st argument. Returns 0 in EAX.
    6564#
    66 context_restore:
     65FUNCTION_BEGIN(context_restore)
    6766        movl 4(%esp), %eax  # address of the context variable to restore context from
    6867       
     
    7877       
    7978        # set thread local storage
    80         pushl %edx
    8179        movl CONTEXT_OFFSET_TLS(%eax), %edx     # Set arg1 to TLS addr
    82         movl $1, %eax                           # Syscall SYS_TLS_SET
    83         int $0x30
    84         popl %edx
     80        movl %edx, %gs:0
    8581       
    8682        xorl %eax, %eax         # context_restore returns 0
    8783        ret
     84FUNCTION_END(context_restore)
    8885
Note: See TracChangeset for help on using the changeset viewer.