Ignore:
Timestamp:
Jan 9, 2019, 3:02:51 PM (5 years ago)
Author:
alain
Message:

Introduce sigificant modifs in VFS to support the <ls> command,
and the . and .. directories entries.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/thread.c

    r593 r611  
    326326    {
    327327            printk("\n[ERROR] in %s : cannot create new thread\n", __FUNCTION__ );
    328         vmm_remove_vseg( vseg );
     328        vmm_delete_vseg( process->pid , vseg->min );
    329329        return ENOMEM;
    330330    }
     
    348348    {
    349349            printk("\n[ERROR] in %s : cannot initialize new thread\n", __FUNCTION__ );
    350         vmm_remove_vseg( vseg );
     350        vmm_delete_vseg( process->pid , vseg->min );
    351351        thread_release( thread );
    352352        return EINVAL;
     
    369369    {
    370370            printk("\n[ERROR] in %s : cannot create CPU context\n", __FUNCTION__ );
    371         vmm_remove_vseg( vseg );
     371        vmm_delete_vseg( process->pid , vseg->min );
    372372        thread_release( thread );
    373373        return ENOMEM;
     
    379379    {
    380380            printk("\n[ERROR] in %s : cannot create FPU context\n", __FUNCTION__ );
    381         vmm_remove_vseg( vseg );
     381        vmm_delete_vseg( process->pid , vseg->min );
    382382        thread_release( thread );
    383383        return ENOMEM;
     
    538538
    539539    // register STACK vseg in local child VSL
    540     vmm_vseg_attach( &child_process->vmm , vseg );
     540    vmm_attach_vseg_to_vsl( &child_process->vmm , vseg );
    541541
    542542#if (DEBUG_THREAD_USER_FORK & 1)
     
    560560        if( error )
    561561        {
    562             vmm_vseg_detach( &child_process->vmm , vseg );
    563             vseg_free( vseg );
     562            vmm_detach_vseg_from_vsl( &child_process->vmm , vseg );
    564563            thread_release( child_ptr );
    565564            printk("\n[ERROR] in %s : cannot update child GPT\n", __FUNCTION__ );
Note: See TracChangeset for help on using the changeset viewer.