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/remote_queuelock.c

    r623 r629  
    22 * remote_queuelock.c - remote 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
     
    5656#if DEBUG_QUEUELOCK_TYPE
    5757thread_t * this = CURRENT_THREAD;
    58 if( DEBUG_QUEUELOCK_TYPE == type )
     58if( (type     == DEBUG_QUEUELOCK_TYPE) &&
     59    (lock_ptr == DEBUG_QUEUELOCK_PTR ) &&
     60    (lock_cxy == DEBUG_QUEUELOCK_CXY ) )
    5961printk("\n[%s] thread[%x,%x] initialise lock %s [%x,%x]\n",
    6062__FUNCTION__, this->process->pid, this->trdid,
     
    9193
    9294#if DEBUG_QUEUELOCK_TYPE
    93 if( (DEBUG_QUEUELOCK_TYPE == lock_type) || (DEBUG_QUEUELOCK_TYPE == 1000) )
     95if( (lock_type == DEBUG_QUEUELOCK_TYPE) &&
     96    (lock_ptr  == DEBUG_QUEUELOCK_PTR ) &&
     97    (lock_cxy  == DEBUG_QUEUELOCK_CXY ) )
    9498printk("\n[%s] thread[%x,%x] BLOCK on q_lock %s [%x,%x]\n",
    9599__FUNCTION__, this->process->pid, this->trdid,
     
    117121
    118122#if DEBUG_QUEUELOCK_TYPE
    119 if( (DEBUG_QUEUELOCK_TYPE == lock_type) || (DEBUG_QUEUELOCK_TYPE == 1000) )
     123if( (lock_type == DEBUG_QUEUELOCK_TYPE) &&
     124    (lock_ptr  == DEBUG_QUEUELOCK_PTR ) &&
     125    (lock_cxy  == DEBUG_QUEUELOCK_CXY ) )
    120126printk("\n[%s] thread[%x,%x] ACQUIRE q_lock %s [%x,%x]\n",
    121127__FUNCTION__, this->process->pid, this->trdid,
     
    152158thread_t * this      = CURRENT_THREAD;
    153159uint32_t   lock_type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->lock.type ) );
    154 if( (DEBUG_QUEUELOCK_TYPE == lock_type) || (DEBUG_QUEUELOCK_TYPE == 1000) )
     160if( (lock_type == DEBUG_QUEUELOCK_TYPE) &&
     161    (lock_ptr  == DEBUG_QUEUELOCK_PTR ) &&
     162    (lock_cxy  == DEBUG_QUEUELOCK_CXY ) )
    155163printk("\n[%s] thread[%x,%x] RELEASE q_lock %s (%x,%x)\n",
    156164__FUNCTION__, this->process->pid, this->trdid,
     
    171179
    172180#if DEBUG_QUEUELOCK_TYPE
    173 if( (DEBUG_QUEUELOCK_TYPE == lock_type) || (DEBUG_QUEUELOCK_TYPE == 1000) )
     181if( (lock_type == DEBUG_QUEUELOCK_TYPE) &&
     182    (lock_ptr  == DEBUG_QUEUELOCK_PTR ) &&
     183    (lock_cxy  == DEBUG_QUEUELOCK_CXY ) )
    174184{
    175185    trdid_t     trdid   = hal_remote_l32( XPTR( thread_cxy , &thread_ptr->trdid ) );
Note: See TracChangeset for help on using the changeset viewer.