Changeset 4b2c872d in mainline for arch/ia32/src


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/ia32/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
    3535## Save current CPU context
    3636#
    37 # Save CPU context to the kernel_context variable
     37# Save CPU context to the context_t variable
    3838# pointed by the 1st argument. Returns 1 in EAX.
    3939#
    40 context_save:
     40context_save_arch:
    4141        movl 0(%esp),%eax       # the caller's return %eip
    4242        movl 4(%esp),%edx       # address of the kernel_context variable to save context to
     
    5454
    5555
    56 ## Restore current CPU context
     56## Restore saved CPU context
    5757#
    58 # Restore CPU context from the kernel_context variable
     58# Restore CPU context from context_t variable
    5959# pointed by the 1st argument. Returns 0 in EAX.
    6060#
    61 context_restore:
     61context_restore_arch:
    6262        movl 4(%esp),%eax       # address of the kernel_context variable to restore context from
    6363        movl 0(%eax),%esp       # ctx->sp -> %esp
Note: See TracChangeset for help on using the changeset viewer.