Ignore:
Timestamp:
Mar 7, 2018, 9:02:03 AM (6 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/spinlock.c

    r433 r436  
    3838    lock->taken = 0;
    3939
    40 #if CONFIG_DEBUG_LOCKS
    41     lock->owner = NULL;
    42     list_entry_init( &lock->list );
     40#if CONFIG_DEBUG_SPINLOCKS
     41lock->owner = NULL;
     42list_entry_init( &lock->list );
    4343#endif
    4444
     
    7171    this->local_locks++;
    7272
    73 #if CONFIG_DEBUG_LOCKS
    74     lock->owner = this;
    75     list_add_first( &this->locks_root , &lock->list );
     73#if CONFIG_DEBUG_SPINLOCKS
     74lock->owner = this;
     75list_add_first( &this->locks_root , &lock->list );
    7676#endif
    7777
     
    8686    thread_t * this = CURRENT_THREAD;;
    8787
    88 #if CONFIG_DEBUG_LOCKS
    89     lock->owner = NULL;
    90     list_unlink( &lock->list );
     88#if CONFIG_DEBUG_SPINLOCKS
     89lock->owner = NULL;
     90list_unlink( &lock->list );
    9191#endif
    9292
     
    132132    this->local_locks++;
    133133
    134 #if CONFIG_DEBUG_LOCKS
    135     lock->owner = this;
    136     list_add_first( &this->locks_root , &lock->list );
     134#if CONFIG_DEBUG_SPINLOCKS
     135lock->owner = this;
     136list_add_first( &this->locks_root , &lock->list );
    137137#endif
    138138
     
    162162        this->local_locks++;
    163163
    164 #if CONFIG_DEBUG_LOCKS
    165         lock->owner = this;
    166         list_add_first( &this->locks_root , &lock->list );
     164#if CONFIG_DEBUG_SPINLOCKS
     165lock->owner = this;
     166list_add_first( &this->locks_root , &lock->list );
    167167#endif
    168168
     
    177177    thread_t * this = CURRENT_THREAD;
    178178
    179 #if CONFIG_DEBUG_LOCKS
    180     lock->owner = NULL;
    181     list_unlink( &lock->list );
     179#if CONFIG_DEBUG_SPINLOCKS
     180lock->owner = NULL;
     181list_unlink( &lock->list );
    182182#endif
    183183
Note: See TracChangeset for help on using the changeset viewer.