Ignore:
Timestamp:
Oct 10, 2018, 3:11:53 PM (6 years ago)
Author:
alain
Message:

1) Improve the busylock debug infrastructure.
2) introduce a non-distributed, but portable implementation for the pthread_barrier.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/chdev.c

    r564 r581  
    154154    chdev_t * chdev_ptr = GET_PTR( chdev_xp );
    155155
    156 // check calling thread can yield
    157 assert( (this->busylocks == 0),
    158 "cannot yield : busylocks = %d\n", this->busylocks );
     156    // check calling thread can yield
     157    thread_assert_can_yield( this , __FUNCTION__ );
    159158
    160159    // get local and extended pointers on server thread
     
    197196    // build extended pointer on lock protecting chdev waiting queue
    198197    lock_xp            = XPTR( chdev_cxy , &chdev_ptr->wait_lock );
     198
     199    // TODO the hal_disable_irq() / hal_restore_irq()
     200    // in the sequence below is probably useless, as it is
     201    // already done by the busylock_acquire() / busylock_release()
     202    // => remove it [AG] october 2018
    199203
    200204    // critical section for the following sequence:
     
    206210    // (6) release the lock protecting waiting queue
    207211    // (7) deschedule
    208     // ... in this order
    209212
    210213    // enter critical section
Note: See TracChangeset for help on using the changeset viewer.