Ignore:
Timestamp:
Oct 10, 2020, 5:27:12 PM (4 years ago)
Author:
alain
Message:

Cosmetic.

File:
1 edited

Legend:

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

    r629 r666  
    4747#if DEBUG_QUEUELOCK_TYPE
    4848thread_t * this = CURRENT_THREAD;
    49 if( (type      == DEBUG_QUEUELOCK_TYPE) &&
    50     (lock      == DEBUG_QUEUELOCK_PTR ) &&
    51     (local_cxy == DEBUG_QUEUELOCK_CXY ) )
    52 printk("\n[%s] thread[%x,%x] initialise lock %s [%x,%x]\n",
     49bool_t     cond = (type == DEBUG_QUEUELOCK_TYPE) &&
     50                  (((local_cxy == (cxy_t)DEBUG_QUEUELOCK_CXY) &&
     51                    (lock == (queuelock_t*)DEBUG_QUEUELOCK_PTR)) ||
     52                   ((DEBUG_QUEUELOCK_CXY == 0) &&
     53                    (DEBUG_QUEUELOCK_PTR == 0)));
     54if( cond ) printk("\n[%s] thread[%x,%x] initialise lock %s [%x,%x]\n",
    5355__FUNCTION__, this->process->pid, this->trdid,
    5456lock_type_str[type], local_cxy, lock );
     
    7072#if DEBUG_QUEUELOCK_TYPE
    7173uint32_t   lock_type = lock->lock.type;
     74bool_t     cond = (lock_type == DEBUG_QUEUELOCK_TYPE) &&
     75                  (((local_cxy == (cxy_t)DEBUG_QUEUELOCK_CXY) &&
     76                    (lock == (queuelock_t*)DEBUG_QUEUELOCK_PTR)) ||
     77                   ((DEBUG_QUEUELOCK_CXY == 0) &&
     78                    (DEBUG_QUEUELOCK_PTR == 0)));
    7279#endif
    7380
     
    7784
    7885#if DEBUG_QUEUELOCK_TYPE
    79 if( (lock_type == DEBUG_QUEUELOCK_TYPE) &&
    80     (lock      == DEBUG_QUEUELOCK_PTR ) &&
    81     (local_cxy == DEBUG_QUEUELOCK_CXY ) )
    82 printk("\n[%s ] thread[%x,%x] BLOCK on q_lock %s [%x,%x]\n",
     86if( cond ) printk("\n[%s ] thread[%x,%x] BLOCK on q_lock %s [%x,%x]\n",
    8387__FUNCTION__, this->process->pid, this->trdid,
    8488lock_type_str[lock_type], local_cxy, lock );
     
    104108
    105109#if DEBUG_QUEUELOCK_TYPE
    106 if( (lock_type == DEBUG_QUEUELOCK_TYPE) &&
    107     (lock      == DEBUG_QUEUELOCK_PTR ) &&
    108     (local_cxy == DEBUG_QUEUELOCK_CXY ) )
    109 printk("\n[%s] thread[%x,%x] ACQUIRE q_lock %s [%x,%x]\n",
     110if( cond ) printk("\n[%s] thread[%x,%x] ACQUIRE q_lock %s [%x,%x]\n",
    110111__FUNCTION__, this->process->pid, this->trdid,
    111112lock_type_str[lock_type], local_cxy, lock );
     
    132133uint32_t   lock_type = lock->lock.type;
    133134thread_t * this      = CURRENT_THREAD;
    134 if( (lock_type == DEBUG_QUEUELOCK_TYPE) &&
    135     (lock      == DEBUG_QUEUELOCK_PTR ) &&
    136     (local_cxy == DEBUG_QUEUELOCK_CXY ) )
    137 printk("\n[%s] thread[%x,%x] RELEASE q_lock %s [%x,%x]\n",
     135bool_t     cond = (lock_type == DEBUG_QUEUELOCK_TYPE) &&
     136                  (((local_cxy == (cxy_t)DEBUG_QUEUELOCK_CXY) &&
     137                    (lock == (queuelock_t*)DEBUG_QUEUELOCK_PTR)) ||
     138                   ((DEBUG_QUEUELOCK_CXY == 0) &&
     139                    (DEBUG_QUEUELOCK_PTR == 0)));
     140#endif
     141
     142#if DEBUG_QUEUELOCK_TYPE
     143if( cond ) printk("\n[%s] thread[%x,%x] RELEASE q_lock %s [%x,%x]\n",
    138144__FUNCTION__, this->process->pid, this->trdid,
    139145lock_type_str[lock_type], local_cxy, lock );
     
    150156
    151157#if DEBUG_QUEUELOCK_TYPE
    152 if( (lock_type == DEBUG_QUEUELOCK_TYPE) &&
    153     (lock      == DEBUG_QUEUELOCK_PTR ) &&
    154     (local_cxy == DEBUG_QUEUELOCK_CXY ) )
    155 printk("\n[%s] thread[%x,%x] UNBLOCK thread [%x,%x] / q_lock %s [%x,%x]\n",
     158if( cond ) printk("\n[%s] thread[%x,%x] UNBLOCK thread [%x,%x] / q_lock %s [%x,%x]\n",
    156159__FUNCTION__, this->process->pid, this->trdid, thread->process->pid, thread->trdid,
    157160lock_type_str[lock_type], local_cxy, lock );
Note: See TracChangeset for help on using the changeset viewer.