Ignore:
Timestamp:
May 17, 2019, 9:27:04 AM (5 years ago)
Author:
alain
Message:

Remove the "giant" rwlock protecting the GPT, and
use the GPT_LOCKED attribute in each PTE to prevent
concurrent modifications of one GPT entry.
The version number has been incremented to 2.1.

File:
1 edited

Legend:

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

    r623 r629  
    22 * queuelock.c - local kernel lock with waiting queue implementation.
    33 *
    4  * Authors   Alain Greiner     (2016,2017,2018)
     4 * Authors   Alain Greiner     (2016,2017,2018,2019)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    4747#if DEBUG_QUEUELOCK_TYPE
    4848thread_t * this = CURRENT_THREAD;
    49 if( DEBUG_QUEUELOCK_TYPE == type )
     49if( (type      == DEBUG_QUEUELOCK_TYPE) &&
     50    (lock      == DEBUG_QUEUELOCK_PTR ) &&
     51    (local_cxy == DEBUG_QUEUELOCK_CXY ) )
    5052printk("\n[%s] thread[%x,%x] initialise lock %s [%x,%x]\n",
    5153__FUNCTION__, this->process->pid, this->trdid,
     
    7577
    7678#if DEBUG_QUEUELOCK_TYPE
    77 if( (DEBUG_QUEUELOCK_TYPE == lock_type) || (DEBUG_QUEUELOCK_TYPE == 1000) )
     79if( (lock_type == DEBUG_QUEUELOCK_TYPE) &&
     80    (lock      == DEBUG_QUEUELOCK_PTR ) &&
     81    (local_cxy == DEBUG_QUEUELOCK_CXY ) )
    7882printk("\n[%s ] thread[%x,%x] BLOCK on q_lock %s [%x,%x]\n",
    7983__FUNCTION__, this->process->pid, this->trdid,
     
    100104
    101105#if DEBUG_QUEUELOCK_TYPE
    102 if( (DEBUG_QUEUELOCK_TYPE == lock_type) || (DEBUG_QUEUELOCK_TYPE == 1000) )
     106if( (lock_type == DEBUG_QUEUELOCK_TYPE) &&
     107    (lock      == DEBUG_QUEUELOCK_PTR ) &&
     108    (local_cxy == DEBUG_QUEUELOCK_CXY ) )
    103109printk("\n[%s] thread[%x,%x] ACQUIRE q_lock %s [%x,%x]\n",
    104110__FUNCTION__, this->process->pid, this->trdid,
     
    126132uint32_t   lock_type = lock->lock.type;
    127133thread_t * this      = CURRENT_THREAD;
    128 if( (DEBUG_QUEUELOCK_TYPE == lock_type) || (DEBUG_QUEUELOCK_TYPE == 1000) )
     134if( (lock_type == DEBUG_QUEUELOCK_TYPE) &&
     135    (lock      == DEBUG_QUEUELOCK_PTR ) &&
     136    (local_cxy == DEBUG_QUEUELOCK_CXY ) )
    129137printk("\n[%s] thread[%x,%x] RELEASE q_lock %s [%x,%x]\n",
    130138__FUNCTION__, this->process->pid, this->trdid,
     
    142150
    143151#if DEBUG_QUEUELOCK_TYPE
    144 if( (DEBUG_QUEUELOCK_TYPE == lock_type) || (DEBUG_QUEUELOCK_TYPE == 1000) )
     152if( (lock_type == DEBUG_QUEUELOCK_TYPE) &&
     153    (lock      == DEBUG_QUEUELOCK_PTR ) &&
     154    (local_cxy == DEBUG_QUEUELOCK_CXY ) )
    145155printk("\n[%s] thread[%x,%x] UNBLOCK thread [%x,%x] / q_lock %s [%x,%x]\n",
    146156__FUNCTION__, this->process->pid, this->trdid, thread->process->pid, thread->trdid,
Note: See TracChangeset for help on using the changeset viewer.