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/kernel/kern/kernel_init.c

    r407 r408  
    122122vfs_ctx_t            fs_context[FS_TYPES_NR]                 CONFIG_CACHE_LINE_ALIGNED;
    123123
    124 // These variables are used by the sched_yield function to save SR value
    125 __attribute__((section(".kdata")))
    126 uint32_t             switch_save_sr[CONFIG_MAX_LOCAL_CORES]  CONFIG_CACHE_LINE_ALIGNED;
    127 
    128 #if CONFIG_READ_DEBUG
     124
     125// TODO remove these debug variables used dans sys_read()
     126
     127#if CONFIG_READ_DEBUG   
    129128uint32_t   enter_sys_read;
    130129uint32_t   exit_sys_read;
     
    342341///////////////////////////////////////////////////////////////////////////////////////////
    343342// This function allocates memory and initializes the chdev descriptors for the 
    344 // external (shared) peripherals other than the IOPIC, as specified by the boot_info,
    345 // including the dynamic linking with the driver for the specified implementation.
     343// external (shared) peripherals other than the IOPIC, as specified by the boot_info.
     344// This includes the dynamic linking with the driver for the specified implementation.
    346345// These chdev descriptors are distributed on all clusters, using a modulo on a global
    347 // index, identically computed in all clusters: In each cluster, the local CP0 core
    348 // computes the global index for all external chdevs, and creates only the chdevs that
    349 // must be placed in the local cluster.
     346// index, identically computed in all clusters.
     347// This function is executed in all clusters by the CP0 core, that computes a global index
     348// for all external chdevs. Each CP0 core creates only the chdevs that must be placed in
     349// the local cluster, because the global index matches the local index.
    350350// The relevant entries in all copies of the devices directory are initialised.
    351351///////////////////////////////////////////////////////////////////////////////////////////
     
    830830
    831831    // all CP0s initialize the process_zero descriptor
    832     if( core_lid == 0 ) process_reference_init( &process_zero , 0 , XPTR_NULL );
     832    if( core_lid == 0 ) process_zero_init( &process_zero );
    833833
    834834    // CP0 in cluster 0 initializes the PIC chdev,
Note: See TracChangeset for help on using the changeset viewer.