Changeset 4b2c872d in mainline for arch/amd64/src/context.S


Ignore:
Timestamp:
2005-10-18T09:33:02Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8005218
Parents:
22f7769
Message:

Create generic context_save() and context_restore().
These two functions are defined inline and only call context_save_arch() and context_restore_arch(), respectively.
The main purpose of this is to enable centralized commenting of these important and tricky functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/amd64/src/context.S

    r22f7769 r4b2c872d  
    2929.text
    3030
    31 .global context_save
    32 .global context_restore
     31.global context_save_arch
     32.global context_restore_arch
    3333
    3434#include <arch/context_offset.h>
     
    3636## Save current CPU context
    3737#
    38 # Save CPU context to the kernel_context variable
     38# Save CPU context to context_t variable
    3939# pointed by the 1st argument. Returns 1 in EAX.
    4040#
    41 context_save:
     41context_save_arch:
    4242        movq (%rsp), %rdx     # the caller's return %eip
    4343        # In %edi is passed 1st argument
     
    5959## Restore current CPU context
    6060#
    61 # Restore CPU context from the kernel_context variable
     61# Restore CPU context from context_t variable
    6262# pointed by the 1st argument. Returns 0 in EAX.
    6363#
    64 context_restore:       
     64context_restore_arch:   
    6565        movq OFFSET_R15(%rdi), %r15
    6666        movq OFFSET_R14(%rdi), %r14
Note: See TracChangeset for help on using the changeset viewer.