Ignore:
Timestamp:
Dec 27, 2018, 7:38:58 PM (3 years ago)
Author:
alain
Message:

Fix several bugs in VFS to support the following
ksh commandis : cp, mv, rm, mkdir, cd, pwd

File:
1 edited

Legend:

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

    r603 r610  
    5454    remote_busylock_init( XPTR( lock_cxy , &lock_ptr->lock ) , type );
    5555
    56 #if DEBUG_QUEUELOCK
     56#if DEBUG_QUEUELOCK_TYPE
    5757thread_t * this = CURRENT_THREAD;
    58 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() )
     58if( DEBUG_QUEUELOCK_TYPE == type )
    5959printk("\n[%s] thread[%x,%x] initialise lock %s [%x,%x]\n",
    6060__FUNCTION__, this->process->pid, this->trdid,
     
    7676    remote_queuelock_t * lock_ptr = GET_PTR( lock_xp );
    7777
    78 #if DEBUG_QUEUELOCK
     78#if DEBUG_QUEUELOCK_TYPE
    7979uint32_t lock_type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->lock.type ) );
    8080#endif
     
    9090    {
    9191
    92 #if DEBUG_QUEUELOCK
    93 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() )
     92#if DEBUG_QUEUELOCK_TYPE
     93if( DEBUG_QUEUELOCK_TYPE == lock_type )
    9494printk("\n[%s] thread[%x,%x] BLOCK on q_lock %s [%x,%x]\n",
    9595__FUNCTION__, this->process->pid, this->trdid,
     
    116116    }
    117117
    118 #if DEBUG_QUEUELOCK
    119 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() )
     118#if DEBUG_QUEUELOCK_TYPE
     119if( DEBUG_QUEUELOCK_TYPE == lock_type )
    120120printk("\n[%s] thread[%x,%x] ACQUIRE q_lock %s [%x,%x]\n",
    121121__FUNCTION__, this->process->pid, this->trdid,
     
    128128    // release busylock
    129129    remote_busylock_release( busylock_xp );
     130
     131    hal_fence();
    130132
    131133}  // end remote_queuelock_acquire()
     
    147149    remote_busylock_acquire( busylock_xp );
    148150
    149 #if DEBUG_QUEUELOCK
     151#if DEBUG_QUEUELOCK_TYPE
    150152thread_t * this      = CURRENT_THREAD;
    151153uint32_t   lock_type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->lock.type ) );
    152 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() )
     154if( DEBUG_QUEUELOCK_TYPE == lock_type )
    153155printk("\n[%s] thread[%x,%x] RELEASE q_lock %s (%x,%x)\n",
    154156__FUNCTION__, this->process->pid, this->trdid,
     
    168170        thread_t * thread_ptr = GET_PTR( thread_xp );
    169171
    170 #if DEBUG_QUEUELOCK
    171 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() )
     172#if DEBUG_QUEUELOCK_TYPE
     173if( DEBUG_QUEUELOCK_TYPE == lock_type )
    172174{
    173175    trdid_t     trdid   = hal_remote_l32( XPTR( thread_cxy , &thread_ptr->trdid ) );
Note: See TracChangeset for help on using the changeset viewer.