Ignore:
Timestamp:
Mar 7, 2018, 9:02:03 AM (4 years ago)
Author:
alain
Message:

1) improve the threads and process destruction mechanism.
2) introduce FIFOs in the soclib_tty driver.

File:
1 edited

Legend:

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

    r433 r436  
    22 * rwlock.c - kernel read/write lock synchronization.
    33 *
    4  * Author  Alain Greiner     (2016}
     4 * Author  Alain Greiner     (2016,2017,2018)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    3838    lock->count   = 0;
    3939
    40 #if CONFIG_DEBUG_LOCKS
    41         lock->owner   = NULL;
    42     list_entry_init( &lock->list );
     40#if CONFIG_DEBUG_RWLOCKS
     41lock->owner   = NULL;
     42list_entry_init( &lock->list );
    4343#endif
    4444
     
    7070    this->local_locks++;
    7171
    72 #if CONFIG_DEBUG_LOCKS
    73     list_add_first( &this->locks_root , &lock->list );
     72#if CONFIG_DEBUG_RWLOCKS
     73list_add_first( &this->locks_root , &lock->list );
    7474#endif
    7575
     
    9898    this->local_locks--;
    9999
    100 #if CONFIG_DEBUG_LOCKS
    101     list_unlink( &lock->list );
     100#if CONFIG_DEBUG_RWLOCKS
     101list_unlink( &lock->list );
    102102#endif
    103103
     
    138138    this->local_locks++;
    139139
    140 #if CONFIG_DEBUG_LOCKS
    141     lock->owner = this;
    142     list_add_first( &this->locks_root , &lock->list );
     140#if CONFIG_DEBUG_RWLOCKS
     141lock->owner = this;
     142list_add_first( &this->locks_root , &lock->list );
    143143#endif
    144144
     
    157157        hal_disable_irq( &mode );
    158158 
    159 #if CONFIG_DEBUG_LOCKS
    160     lock->owner = NULL;
    161     list_unlink( &lock->list );
     159#if CONFIG_DEBUG_RWLOCKS
     160lock->owner = NULL;
     161list_unlink( &lock->list );
    162162#endif
    163163
Note: See TracChangeset for help on using the changeset viewer.