Ignore:
Timestamp:
Dec 5, 2017, 4:20:07 PM (4 years ago)
Author:
alain
Message:

Fix several bugs in the fork() syscall.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/generic/hal_switch.h

    r407 r408  
    4646/*************************************************************************************
    4747 * The hal_do_cpu_save() function is an assembly level function, called by the
    48  * sys_fork() system call to save the parent thread register values to a child
     48 * hal_cpu_context_save() functio to save the calling CPU register values to a
    4949 * CPU context identified by the <ctx> pointer.
    5050 * This function does NOT modify any register before saving values into context.
    5151 * The architecture specific hal_cpu_context_t structure used to store a CPU context
    5252 * is defined in the architecture specific hal_context.c file.
    53  * Two context slots are not saved from the calling thread registers values :
    54  * - the "current_thread" slot is set from the value defined by the <thread> argument.
    55  * - the "stack_pointer" slot is set by adding the value defined by the <offset>
    56  *   argument to the current sp register value.
    5753 * When the save is completed, it simply returns to the calling function.
    5854 *************************************************************************************
    59  * @ ctx     : local pointer on target thread CPU context.
    60  * @ thread  : local pointer on target thread descriptor.
    61  * @ offset  : kernel stack pointer offset (&child - &parent).
     55 * @ ctx     : local pointer on CPU context.
    6256 ************************************************************************************/
    63 void hal_do_cpu_save( void * ctx,
    64                       void * thread,
    65                       int    offset );
     57void hal_do_cpu_save( void * ctx );
    6658
    6759#endif  /* _HAL_SWITCH_H_ */
Note: See TracChangeset for help on using the changeset viewer.