Apr 10, 2019, 10:09:39 AM (5 years ago)

Fix a bug in the vmm_remove_vseg() function: the physical pages
associated to an user DATA vseg were released to the kernel when
the target process descriptor was in the reference cluster.
This physical pages release should be done only when the page
forks counter value is zero.
All other modifications are cosmetic.

1 edited


  • trunk/hal/generic/hal_gpt.h

    r624 r625  
    169  * This function is used to implement the "fork" system call: It copies one GPT entry
    170  * identified by the <vpn> argument, from a remote <src_gpt_xp> to a local <dst_gpt>.
     169 * This function is used to implement the "fork" system call: It copies a remote
     170 * source PTE, identified by the <src_gpt_xp> and <src_vpn> arguments, to a local
     171 * destination PTE, identified by the <dst_gpt> and <dst_vpn> arguments.
    171172 * It does nothing if the source PTE is not MAPPED and SMALL.
    172173 * It optionnally activates the "Copy on Write" mechanism: when the <cow> argument is
    173174 * true: the GPT_WRITABLE flag is reset, and the GPT_COW flag is set.
    174  * A new second level PT2(s) is allocated for destination GPT if required.
     175 * A new second level PT2 is allocated for the destination GPT if required.
    175176 * It returns in the <ppn> and <mapped> arguments the PPN value for the copied PTE,
    176177 * and a boolean indicating if the PTE is mapped and small, and was actually copied.
    177178 ****************************************************************************************
    178  * @ dst_gpt      : [in]  local pointer on the local destination GPT.
    179  * @ src_gpt_xp   : [in]  extended pointer on the remote source GPT.
    180  * @ vpn_base     : [in]  vpn defining the PTE to be copied.
     179 * @ dst_gpt      : [in]  local pointer on local destination GPT.
     180 * @ dst_vpn      : [in]  vpn defining the PTE in the desination GPT.
     181 * @ src_gpt_xp   : [in]  extended pointer on remote source GPT.
     182 * @ src_vpn      : [in]  vpn defining the PTE in the source GPT.
    181183 * @ cow          : [in]  activate the COPY-On-Write mechanism if true.
    182184 * @ ppn          : [out] PPN value (only if mapped is true).
    185187 ***************************************************************************************/
    186188error_t hal_gpt_pte_copy( gpt_t    * dst_gpt,
     189                          vpn_t      dst_vpn,
    187190                          xptr_t     src_gpt_xp,
    188                           vpn_t      vpn,
     191                          vpn_t      src_vpn,
    189192                          bool_t     cow,
    190193                          ppn_t    * ppn,
Note: See TracChangeset for help on using the changeset viewer.