Ignore:
Timestamp:
Nov 10, 2018, 5:38:51 PM (3 years ago)
Author:
alain
Message:

Cosmetic: improve debug.

File:
1 edited

Legend:

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

    r563 r600  
    6363#if DEBUG_QUEUELOCK
    6464if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() )
    65 {
    66     printk("\n[DBG] %s : thread %x in process %x BLOCK on q_lock %s [%x,%x]\n",
    67     __FUNCTION__, this->trdid, this->process->pid,
    68     lock_type_str[lock->lock.type], local_cxy, lock );
    69 }
     65printk("\n[%s ] thread[%x,%x] BLOCK on q_lock %s [%x,%x]\n",
     66__FUNCTION__, this->process->pid, this->trdid, lock_type_str[lock->lock.type], local_cxy, lock );
    7067#endif
    7168        // get pointer on calling thread
     
    9087#if DEBUG_QUEUELOCK
    9188if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() )
    92 {
    93     printk("\n[DBG] %s : thread %x in process %x ACQUIRE q_lock %s [%x,%x]\n",
    94     __FUNCTION__, this->trdid, this->process->pid,
    95     lock_type_str[lock->lock.type], local_cxy, lock );
    96 }
     89printk("\n[%s] thread[%x,%x] ACQUIRE q_lock %s [%x,%x]\n",
     90__FUNCTION__, this->process->pid, this->trdid, lock_type_str[lock->lock.type], local_cxy, lock );
    9791#endif
    9892
     
    115109
    116110#if DEBUG_QUEUELOCK
     111thread_t * this = CURRENT_THREAD;
    117112if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() )
    118 {
    119     thread_t * this = CURRENT_THREAD;
    120     printk("\n[DBG] %s : thread %x in %x process RELEASE q_lock %s [%x,%x]\n",
    121     __FUNCTION__, this->trdid, this->process->pid,
    122     lock_type_str[lock->lock.type], local_cxy, lock );
    123 }
     113printk("\n[%s] thread[%x,%x] RELEASE q_lock %s [%x,%x]\n",
     114__FUNCTION__, this->process->pid, this->trdid, lock_type_str[lock->lock.type], local_cxy, lock );
    124115#endif
    125116
     
    135126#if DEBUG_QUEUELOCK
    136127if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() )
    137 {
    138     thread_t * this = CURRENT_THREAD;
    139     printk("\n[DBG] %s : thread %x in process %x UNBLOCK thread %x in process %x"
    140     " / q_lock %s [%x,%x]\n",
    141     __FUNCTION__, this->trdid, this->process->pid, thread->trdid, thread->process->pid,
    142     lock_type_str[lock->lock.type], local_cxy, lock );
    143 }
     128printk("\n[%s] thread[%x,%x] UNBLOCK thread [%x,%x] / q_lock %s [%x,%x]\n",
     129__FUNCTION__, this->process->pid, this->trdid, thread->process->pid, thread->trdid,
     130lock_type_str[lock->lock.type], local_cxy, lock );
    144131#endif
    145132        // remove this waiting thread from waiting list
Note: See TracChangeset for help on using the changeset viewer.