Changeset 321a8e6 in mainline for uspace/lib/c/arch/ia32/src/fibril.S
- Timestamp:
- 2016-02-20T18:01:33Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 91889d5
- Parents:
- 805729b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/ia32/src/fibril.S
r805729b r321a8e6 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <libarch/fibril_context.h> 30 31 31 32 .text 32 33 .global context_save34 .global context_restore35 33 36 34 ## Save current CPU context … … 39 37 # pointed by the 1st argument. Returns 1 in EAX. 40 38 # 41 context_save: 39 FUNCTION_BEGIN(context_save) 42 40 movl 0(%esp), %eax # the caller's return %eip 43 41 movl 4(%esp), %edx # address of the context variable to save context to … … 58 56 incl %eax 59 57 ret 58 FUNCTION_END(context_save) 60 59 61 60 ## Restore saved CPU context … … 64 63 # pointed by the 1st argument. Returns 0 in EAX. 65 64 # 66 context_restore: 65 FUNCTION_BEGIN(context_restore) 67 66 movl 4(%esp), %eax # address of the context variable to restore context from 68 67 … … 86 85 xorl %eax, %eax # context_restore returns 0 87 86 ret 87 FUNCTION_END(context_restore) 88 88
Note:
See TracChangeset
for help on using the changeset viewer.