Ignore:
Timestamp:
Apr 10, 2019, 10:09:39 AM (5 years ago)
Author:
alain
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/syscalls/sys_write.c

    r624 r625  
    22 * sys_write.c - Kernel function implementing the "write" system call.
    33 *
    4  * Author        Alain Greiner (2016,2017,2018)
     4 * Author        Alain Greiner (2016,2017,2018,2019)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    7676
    7777#if DEBUG_SYS_WRITE
    78 tm_start = hal_get_cycles();
    7978if( DEBUG_SYS_WRITE < tm_start )
    80 printk("\n[%s] thread[%x,%x] enter / vaddr %x / count %d / cycle %d\n",
     79printk("\n[%s] thread[%x,%x] enter / vaddr %x / %d bytes / cycle %d\n",
    8180__FUNCTION__, process->pid, this->trdid, vaddr, count, (uint32_t)tm_start );
    8281#endif
     
    140139    hal_enable_irq( &save_sr );
    141140
    142    // action depend on file type
    143     if( file_type == INODE_TYPE_FILE )  // write to file mapper
     141    // action depend on file type
     142    if( file_type == INODE_TYPE_FILE )  // write to a file mapper
    144143    {
    145144        // check file writable
     
    180179        xptr_t inode_xp = XPTR( file_cxy , inode_ptr );
    181180        vfs_inode_update_size( inode_xp , file_offset + count );
    182 
    183181    }
    184182    else if( file_type == INODE_TYPE_DEV )  // write to TXT device
Note: See TracChangeset for help on using the changeset viewer.