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

    r433 r436  
    22 * remote_rwlock.c - kernel remote rwlock implementation.
    33 *
    4  * Authors    Alain   Greiner (2016,2017)
     4 * Authors    Alain   Greiner (2016,2017,2018)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    4141    hal_remote_sw ( XPTR( lock_cxy , &lock_ptr->count )   , 0 );
    4242
    43 #if CONFIG_DEBUG_LOCKS
    44     hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner )   , XPTR_NULL );
    45     xlist_entry_init( XPTR( lock_cxy , &lock_ptr->list ) );
     43#if CONFIG_DEBUG_REMOTE_RWLOCKS
     44hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner )   , XPTR_NULL );
     45xlist_entry_init( XPTR( lock_cxy , &lock_ptr->list ) );
    4646#endif
    4747
     
    8686    thread_ptr->remote_locks++;
    8787
    88 #if CONFIG_DEBUG_LOCKS
    89     xlist_add_first( XPTR( local_cxy , &thread_ptr->xlocks_root ) ,
    90                      XPTR( lock_cxy ,  &lock_ptr->list ) );
     88#if CONFIG_DEBUG_REMOTE_RWLOCKS
     89xlist_add_first( XPTR( local_cxy , &thread_ptr->xlocks_root ) ,
     90                 XPTR( lock_cxy ,  &lock_ptr->list ) );
    9191#endif
    9292
     
    126126        thread_ptr->remote_locks--;
    127127
    128 #if CONFIG_DEBUG_LOCKS
    129     xlist_unlink( XPTR( lock_cxy , &lock_ptr->list ) );
     128#if CONFIG_DEBUG_REMOTE_RWLOCKS
     129xlist_unlink( XPTR( lock_cxy , &lock_ptr->list ) );
    130130#endif
    131131
     
    176176    }
    177177
    178 #if CONFIG_DEBUG_LOCKS
    179     hal_remote_swd( XPTR( lock_cxy  , &lock_ptr->owner ) ,
    180                     XPTR( local_cxy , thread_ptr ) );
    181     xlist_add_first( XPTR( local_cxy , &thread_ptr->xlocks_root ) ,
    182                      XPTR( lock_cxy  , &lock_ptr->list ) );
     178#if CONFIG_DEBUG_REMOTE_RWLOCKS
     179hal_remote_swd( XPTR( lock_cxy  , &lock_ptr->owner ) ,
     180                XPTR( local_cxy , thread_ptr ) );
     181xlist_add_first( XPTR( local_cxy , &thread_ptr->xlocks_root ) ,
     182                 XPTR( lock_cxy  , &lock_ptr->list ) );
    183183#endif   
    184184
     
    210210 
    211211#if CONFIG_LOCKS_OWNER
    212     hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner ) , XPTR_NULL );
    213     xlist_unlink( XPTR( lock_cxy , &lock_ptr->list ) );
     212hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner ) , XPTR_NULL );
     213xlist_unlink( XPTR( lock_cxy , &lock_ptr->list ) );
    214214#endif
    215215
Note: See TracChangeset for help on using the changeset viewer.