Ignore:
Timestamp:
Mar 6, 2019, 4:37:15 PM (5 years ago)
Author:
alain
Message:

Introduce three new types of vsegs (KCODE,KDATA,KDEV)
to map the kernel vsegs in the process VSL and GPT.
This now used by both the TSAR and the I86 architectures.

File:
1 edited

Legend:

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

    r610 r623  
    7171    busylock_acquire( &lock->lock );
    7272
     73#if DEBUG_RWLOCK_TYPE
     74uint32_t lock_type = lock->lock.type;
     75#endif
     76
    7377    // block and deschedule if lock already taken
    7478    while( lock->taken )
     
    7680
    7781#if DEBUG_RWLOCK_TYPE
    78 uint32_t lock_type = lock->lock.type;
    79 if( DEBUG_RWLOCK_TYPE == lock_type )
     82if( (DEBUG_RWLOCK_TYPE == lock_type) || (DEBUG_RWLOCK_TYPE == 1000) )
    8083printk("\n[%s] thread[%x,%x] READ BLOCK on rwlock %s [%x,%x] / taken %d / count %d\n",
    8184__FUNCTION__, this->process->pid, this->trdid,
     
    102105
    103106#if DEBUG_RWLOCK_TYPE
    104 if( DEBUG_RWLOCK_TYPE == lock_type )
     107if( (DEBUG_RWLOCK_TYPE == lock_type) || (DEBUG_RWLOCK_TYPE == 1000) )
    105108printk("\n[%s] thread[%x,%x] READ ACQUIRE rwlock %s [%x,%x] / taken %d / count %d\n",
    106109__FUNCTION__, this->process->pid, this->trdid,
     
    124127    busylock_acquire( &lock->lock );
    125128
     129#if DEBUG_RWLOCK_TYPE
     130uint32_t lock_type = lock->lock.type;
     131#endif
     132
    126133    // block and deschedule if lock already taken or existing read access
    127134    while( lock->taken || lock->count )
     
    129136
    130137#if DEBUG_RWLOCK_TYPE
    131 uint32_t lock_type = lock->lock.type;
    132 if( DEBUG_RWLOCK_TYPE == lock_type )
     138if( (DEBUG_RWLOCK_TYPE == lock_type) || (DEBUG_RWLOCK_TYPE == 1000) )
    133139printk("\n[%s] thread[%x,%x] WRITE BLOCK on rwlock %s [%x,%x] / taken %d / count %d\n",
    134140__FUNCTION__, this->process->pid, this->trdid,
     
    155161
    156162#if DEBUG_RWLOCK_TYPE
    157 if( DEBUG_RWLOCK_TYPE == lock_type )
     163if( (DEBUG_RWLOCK_TYPE == lock_type) || (DEBUG_RWLOCK_TYPE == 1000) )
    158164printk("\n[%s] thread[%x,%x] WRITE ACQUIRE rwlock %s [%x,%x] / taken %d / count %d\n",
    159165__FUNCTION__, this->process->pid, this->trdid,
     
    181187thread_t * this = CURRENT_THREAD;
    182188uint32_t lock_type = lock->lock.type;
    183 if( DEBUG_RWLOCK_TYPE == lock_type )
     189if( (DEBUG_RWLOCK_TYPE == lock_type) || (DEBUG_RWLOCK_TYPE == 1000) )
    184190printk("\n[%s] thread[%x,%x] READ RELEASE rwlock %s [%x,%x] / taken %d / count %d\n",
    185191__FUNCTION__, this->process->pid, this->trdid,
     
    195201
    196202#if DEBUG_RWLOCK_TYPE
    197 if( DEBUG_RWLOCK_TYPE == lock_type )
     203if( (DEBUG_RWLOCK_TYPE == lock_type) || (DEBUG_RWLOCK_TYPE == 1000) )
    198204printk("\n[%s] thread[%x,%x] UNBLOCK thread[%x,%x] / rwlock %s [%x,%x]\n",
    199205__FUNCTION__, this->process->pid, this->trdid, thread->process->pid, thread->trdid,
     
    217223
    218224#if DEBUG_RWLOCK_TYPE
    219 if( DEBUG_RWLOCK_TYPE == lock_type )
     225if( (DEBUG_RWLOCK_TYPE == lock_type) || (DEBUG_RWLOCK_TYPE == 1000) )
    220226printk("\n[%s] thread[%x,%x] UNBLOCK thread[%x,%x] / rwlock %s [%x,%x]\n",
    221227__FUNCTION__, this->process->pid, this->trdid, thread->process->pid, thread->trdid,
     
    251257thread_t * this = CURRENT_THREAD;
    252258uint32_t lock_type = lock->lock.type;
    253 if( DEBUG_RWLOCK_TYPE == lock_type )
     259if( (DEBUG_RWLOCK_TYPE == lock_type) || (DEBUG_RWLOCK_TYPE == 1000) )
    254260printk("\n[%s] thread[%x,%x] WRITE RELEASE rwlock %s [%x,%x] / taken %d / count %d\n",
    255261__FUNCTION__, this->process->pid, this->trdid,
     
    264270
    265271#if DEBUG_RWLOCK_TYPE
    266 if( DEBUG_RWLOCK_TYPE == lock_type )
     272if( (DEBUG_RWLOCK_TYPE == lock_type) || (DEBUG_RWLOCK_TYPE == 1000) )
    267273printk("\n[%s] thread[%x,%x] UNBLOCK thread[%x,%x] / rwlock %s [%x,%x]\n",
    268274__FUNCTION__, this->process->pid, this->trdid, thread->process->pid, thread->trdid,
     
    285291
    286292#if DEBUG_RWLOCK_TYPE
    287 if( DEBUG_RWLOCK_TYPE == lock_type )
     293if( (DEBUG_RWLOCK_TYPE == lock_type) || (DEBUG_RWLOCK_TYPE == 1000) )
    288294printk("\n[%s] thread[%x,%x] UNBLOCK thread[%x,%x] / rwlock %s [%x,%x]\n",
    289295__FUNCTION__, this->process->pid, this->trdid, thread->process->pid, thread->trdid,
Note: See TracChangeset for help on using the changeset viewer.