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

Fix several bugs in the fork() syscall.

File:
1 edited

Legend:

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

    r407 r408  
    2727#include <hal_types.h>
    2828
    29 //////////////////////////////////////////////////////////////////////////////////////////
     29///////////////////////////////////////////////////////////////////////////////////////
    3030//     Kernel-side syscall handler API
    3131//
    32 // This hal_do_syscall() function extract from the regs_tbl[] array the syscall index,
    33 // and the four syscall arguments. Then it calls the generic do_syscall() kernel function,
    34 // that call itself the relevant kernel function, depending on the syscall index.
     32// This hal_do_syscall() function extract from the calling thread uzone array
     33// the syscall index, and the four syscall arguments.
     34// Then it calls the generic do_syscall() function,
     35// that calls itself the relevant kernel function, depending on the syscall index.
    3536//
    36 // Any architecture specific implementation must implement this API.
    37 //////////////////////////////////////////////////////////////////////////////////////////
    38 
    39 /**** forward declaration  ****/
    40 
    41 struct thread_s;
     37// When the generic do_syscall function returns, it saves the return value
     38// in the UZ_VO slot of the returning thread uzone, and update the UZ_EPC slot.
     39//
     40// WARNING: The returning thread can be different from the entering thread
     41// in the case of a sys_fork() system call.
     42///////////////////////////////////////////////////////////////////////////////////////
    4243
    4344
    44 /*****************************************************************************************
    45  * This function implements the ALMOS-MKH kernel_side syscall handler.
    46  *****************************************************************************************
    47  * @ this     : pointer on the calling thread.
    48  * @ regs_tbl : array containing the core registers values, saved by hal_kentry.
    49  ****************************************************************************************/
    50 void hal_do_syscall( struct thread_s * this,
    51                      reg_t           * regs_tbl );
     45/**************************************************************************************
     46 * This function implements the syscall handler for the TSAR architecture.
     47 *************************************************************************************/
     48void hal_do_syscall();
    5249
    5350
Note: See TracChangeset for help on using the changeset viewer.