Changeset ca783bbe in rtems


Ignore:
Timestamp:
Aug 4, 2016, 8:16:14 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
ee0e4135
Parents:
6117f29
git-author:
Sebastian Huber <sebastian.huber@…> (08/04/16 08:16:14)
git-committer:
Sebastian Huber <sebastian.huber@…> (08/04/16 08:17:54)
Message:

score: Fix _Thread_queue_Path_release()

It is possible that the owner of the terminal link of a thread queue
path waits on a thread queue. However, this thread queue has no owner,
e.g. a thread queue of a message queue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/src/threadqenqueue.c

    r6117f29 rca783bbe  
    178178    Thread_queue_Link *link;
    179179
    180     /* The terminal link has an owner which does not wait on a thread queue */
     180    /*
     181     * The terminal link may have an owner which does not wait on a thread
     182     * queue.
     183     */
     184
    181185    link = THREAD_QUEUE_LINK_OF_PATH_NODE( node );
    182     _Assert( link->Queue_context.Wait.queue == NULL );
    183 
    184     _Thread_Wait_release_default_critical(
    185       link->owner,
    186       &link->Queue_context.Lock_context
    187     );
    188 
    189     node = _Chain_Previous( node );
     186
     187    if ( link->Queue_context.Wait.queue == NULL ) {
     188      _Thread_Wait_release_default_critical(
     189        link->owner,
     190        &link->Queue_context.Lock_context
     191      );
     192
     193      node = _Chain_Previous( node );
    190194#if defined(RTEMS_DEBUG)
    191     _Chain_Set_off_chain( &link->Path_node );
    192 #endif
     195      _Chain_Set_off_chain( &link->Path_node );
     196#endif
     197    }
    193198
    194199    while ( head != node ) {
Note: See TracChangeset for help on using the changeset viewer.