Changeset b4f1171 in mainline for uspace/lib/c/arch/amd64/src/fibril.S


Ignore:
Timestamp:
2019-02-03T14:56:13Z (5 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8f99dbf
Parents:
a5c78a18
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-03 14:49:38)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-03 14:56:13)
Message:

Rename setjmp/longjmp to context_save/context_restore

Once upon a time, I renamed context_save/context_restore to
setjmp/longjmp with the reasoning that they are almost
the same as setjmp/longjmp. I never got rid of the "almost",
so it ended up being somewhat confusing.
This is just a late correction of the old change.

File:
1 edited

Legend:

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

    ra5c78a18 rb4f1171  
    3737# pointed by the 1st argument. Returns 0 in RAX.
    3838#
    39 FUNCTION_BEGIN(__setjmp)
     39FUNCTION_BEGIN(__context_save)
    4040        movq (%rsp), %rdx     # the caller's return %eip
    4141
     
    5454        movq %rax, __CONTEXT_OFFSET_TLS(%rdi)
    5555
    56         xorq %rax, %rax                      # __setjmp returns 0
     56        xorq %rax, %rax                      # __context_save returns 0
    5757        ret
    58 FUNCTION_END(__setjmp)
     58FUNCTION_END(__context_save)
    5959
    6060## Restore current CPU context
     
    6363# pointed by the 1st argument. Returns second argument in RAX.
    6464#
    65 FUNCTION_BEGIN(__longjmp)
     65FUNCTION_BEGIN(__context_restore)
    6666        movq __CONTEXT_OFFSET_R15(%rdi), %r15
    6767        movq __CONTEXT_OFFSET_R14(%rdi), %r14
     
    8080        movq %rdi, %fs:0
    8181
    82         movq %rsi, %rax                      # __longjmp returns second argument
     82        movq %rsi, %rax                      # __context_restore returns second argument
    8383        ret
    84 FUNCTION_END(__longjmp)
     84FUNCTION_END(__context_restore)
    8585
Note: See TracChangeset for help on using the changeset viewer.