Ignore:
Timestamp:
Dec 27, 2018, 7:38:58 PM (5 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/queuelock.c

    r603 r610  
    4545    busylock_init( &lock->lock , type );
    4646
    47 #if DEBUG_QUEUELOCK
     47#if DEBUG_QUEUELOCK_TYPE
    4848thread_t * this = CURRENT_THREAD;
    49 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() )
     49if( DEBUG_QUEUELOCK_TYPE == type )
    5050printk("\n[%s] thread[%x,%x] initialise lock %s [%x,%x]\n",
    5151__FUNCTION__, this->process->pid, this->trdid,
     
    7070    {
    7171
    72 #if DEBUG_QUEUELOCK
    73 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() )
     72#if DEBUG_QUEUELOCK_TYPE
     73uint32_t   lock_type = lock->lock.type;
     74if( DEBUG_QUEUELOCK_TYPE == lock_type )
    7475printk("\n[%s ] thread[%x,%x] BLOCK on q_lock %s [%x,%x]\n",
    7576__FUNCTION__, this->process->pid, this->trdid,
    76 lock_type_str[lock->lock.type], local_cxy, lock );
     77lock_type_str[lock_type], local_cxy, lock );
    7778#endif
    7879        // get pointer on calling thread
     
    9596    }
    9697
    97 #if DEBUG_QUEUELOCK
    98 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() )
     98#if DEBUG_QUEUELOCK_TYPE
     99if( DEBUG_QUEUELOCK_TYPE == lock_type )
    99100printk("\n[%s] thread[%x,%x] ACQUIRE q_lock %s [%x,%x]\n",
    100101__FUNCTION__, this->process->pid, this->trdid,
    101 lock_type_str[lock->lock.type], local_cxy, lock );
     102lock_type_str[lock_type], local_cxy, lock );
    102103#endif
    103104
     
    119120    busylock_acquire( &lock->lock );
    120121
    121 #if DEBUG_QUEUELOCK
    122 thread_t * this = CURRENT_THREAD;
    123 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() )
     122#if DEBUG_QUEUELOCK_TYPE
     123uint32_t   lock_type = lock->lock.type;
     124thread_t * this      = CURRENT_THREAD;
     125if( DEBUG_QUEUELOCK_TYPE == lock_type )
    124126printk("\n[%s] thread[%x,%x] RELEASE q_lock %s [%x,%x]\n",
    125127__FUNCTION__, this->process->pid, this->trdid,
    126 lock_type_str[lock->lock.type], local_cxy, lock );
     128lock_type_str[lock_type], local_cxy, lock );
    127129#endif
    128130
     
    136138        thread_t * thread = LIST_FIRST( &lock->root , thread_t , wait_list );
    137139
    138 #if DEBUG_QUEUELOCK
    139 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() )
     140#if DEBUG_QUEUELOCK_TYPE
     141if( DEBUG_QUEUELOCK_TYPE == lock_type )
    140142printk("\n[%s] thread[%x,%x] UNBLOCK thread [%x,%x] / q_lock %s [%x,%x]\n",
    141143__FUNCTION__, this->process->pid, this->trdid, thread->process->pid, thread->trdid,
    142 lock_type_str[lock->lock.type], local_cxy, lock );
     144lock_type_str[lock_type], local_cxy, lock );
    143145#endif
    144146        // remove this waiting thread from waiting list
Note: See TracChangeset for help on using the changeset viewer.