Changeset 625 for trunk/kernel/libk


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.

Location:
trunk/kernel/libk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/libk/elf.c

    r603 r625  
    196196
    197197#if DEBUG_ELF_LOAD
    198 uint32_t cycle = (uint32_t)hal_get_cycles();
    199 if( DEBUG_ELF_LOAD < cycle )
    200 printk("\n[%s] found %s vseg / base %x / size %x\n"
     198uint32_t   cycle = (uint32_t)hal_get_cycles();
     199thread_t * this  = CURRENT_THREAD;
     200if( DEBUG_ELF_LOAD < cycle )
     201printk("\n[%s] thread[%x,%x] found %s vseg / base %x / size %x\n"
    201202"  file_size %x / file_offset %x / mapper_xp %l / cycle %d\n",
    202 __FUNCTION__ , vseg_type_str(vseg->type) , vseg->min , vseg->max - vseg->min ,
     203__FUNCTION__ , this->process_pid, this->trdid,
     204vseg_type_str(vseg->type) , vseg->min , vseg->max - vseg->min ,
    203205vseg->file_size , vseg->file_offset , vseg->mapper_xp );
    204206#endif
  • trunk/kernel/libk/elf.h

    r457 r625  
    228228
    229229/****************************************************************************************
    230  * This function registers in VMM of the process identified by the <process> argument
    231  * the CODE and DATA vsegs defined in the .elf open file descriptor <file_xp>.
     230 * This function registers in the VSL of the process identified by the <process>
     231 * argument the CODE and DATA vsegs defined in the .elf file descriptor <file_xp>.
    232232 * The segments are not loaded in memory.
    233233 * It also registers the process entry point in VMM.
  • trunk/kernel/libk/remote_rwlock.c

    r623 r625  
    251251        thread_t *  thread_ptr = GET_PTR( thread_xp );
    252252
     253printk("\n@@@ in %s : release first waiting writer[%x,%x]\n",
     254__FUNCTION__, thread_cxy, thread_ptr );
     255
    253256        // remove this waiting thread from waiting list
    254257        xlist_unlink( XPTR( thread_cxy , &thread_ptr->wait_xlist ) );
Note: See TracChangeset for help on using the changeset viewer.