Ignore:
Timestamp:
Mar 6, 2019, 4:37:15 PM (5 years ago)
Author:
alain
Message:

Introduce three new types of vsegs (KCODE,KDATA,KDEV)
to map the kernel vsegs in the process VSL and GPT.
This now used by both the TSAR and the I86 architectures.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/process.h

    r618 r623  
    7373 * is always stored in the same cluster as the inode associated to the file.
    7474 * A free entry in this array contains the XPTR_NULL value.
    75  * The array size is defined by a the CONFIG_PROCESS_FILE_MAX_NR parameter.
     75 * The array size is defined by the CONFIG_PROCESS_FILE_MAX_NR parameter.
    7676 *
    7777 * NOTE: - Only the fd_array[] in the reference process contains a complete list of open
     
    7979 *       - the fd_array[] in a process copy is simply a cache containing a subset of the
    8080 *         open files to speed the fdid to xptr translation, but the "lock" and "current
    81  *         fields should not be used.
     81 *         fields are not used.
    8282 *       - all modifications made by the process_fd_remove() are done in reference cluster
    8383 *         and reported in all process_copies.
     
    200200
    201201/*********************************************************************************************
    202  * This function initialize, in each cluster, the kernel "process_zero", that is the owner
    203  * of all kernel threads in a given cluster. It is called by the kernel_init() function.
     202 * This function initialize, in each cluster, the kernel "process_zero", that contains
     203 * all kernel threads in a given cluster. It is called by the kernel_init() function.
    204204 * The process_zero descriptor is allocated as a global variable in file kernel_init.c
    205205 * Both the PID and PPID fields are set to zero, the ref_xp is the local process_zero,
    206206 * and the parent process is set to XPTR_NULL. The th_tbl[] is initialized as empty.
    207  *********************************************************************************************
    208  * @ process      : [in] pointer on local process descriptor to initialize.
    209  ********************************************************************************************/
    210 void process_zero_create( process_t * process );
     207 * The process GPT is initialised as required by the target architecture.
     208 * The "kcode" and "kdata" segments are registered in the process VSL.
     209 *********************************************************************************************
     210 * @ process  : [in] pointer on process descriptor to initialize.
     211 * @ info     : pointer on local boot_info_t (for kernel segments base and size).
     212 ********************************************************************************************/
     213void process_zero_create( process_t   * process,
     214                          boot_info_t * info );
    211215
    212216/*********************************************************************************************
     
    428432 * identified by the <process_xp> argument, register the <file_xp> argument in the
    429433 * allocated slot, and return the slot index in the <fdid> buffer.
    430  * It can be called by any thread in any cluster, because it uses portable remote access
     434 * It can be called by any thread in any cluster, because it uses remote access
    431435 * primitives to access the reference process descriptor.
    432436 * It takes the lock protecting the reference fd_array against concurrent accesses.
Note: See TracChangeset for help on using the changeset viewer.