Changeset 024bffc6 in rtems


Ignore:
Timestamp:
May 30, 2016, 1:00:32 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
ccda9459
Parents:
a65b02d
git-author:
Sebastian Huber <sebastian.huber@…> (05/30/16 13:00:32)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/30/16 14:16:24)
Message:

score: Use owner of thread queue for CORE mutex

Location:
cpukit/score/include/rtems/score
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/include/rtems/score/coremutex.h

    ra65b02d r024bffc6  
    4848 */
    4949typedef struct {
    50   /** This field is the Waiting Queue used to manage the set of tasks
    51    *  which are blocked waiting to lock the mutex.
     50  /**
     51   * @brief The thread queue of this mutex.
     52   *
     53   * The owner of the thread queue indicates the mutex owner.
    5254   */
    53   Thread_queue_Control    Wait_queue;
    54 
    55   /** This element points to the thread which is currently holding this mutex.
    56    *  The holder is the last thread to successfully lock the mutex and which
    57    *  has not unlocked it.  If the thread is not locked, there is no holder.
    58    */
    59   Thread_Control         *holder;
    60 }   CORE_mutex_Control;
     55  Thread_queue_Control Wait_queue;
     56} CORE_mutex_Control;
    6157
    6258/**
  • cpukit/score/include/rtems/score/coremuteximpl.h

    ra65b02d r024bffc6  
    4141{
    4242  _Thread_queue_Initialize( &the_mutex->Wait_queue );
    43   the_mutex->holder = NULL;
    4443}
    4544
     
    7574)
    7675{
    77   return the_mutex->holder;
     76  return the_mutex->Wait_queue.Queue.owner;
    7877}
    7978
     
    127126)
    128127{
    129   the_mutex->holder = owner;
     128  the_mutex->Wait_queue.Queue.owner = owner;
    130129}
    131130
Note: See TracChangeset for help on using the changeset viewer.