forked from Imagelibrary/rtems
Added blocked_count field to allow for optimizations.
This commit is contained in:
@@ -119,6 +119,7 @@ typedef struct {
|
|||||||
CORE_mutex_Attributes Attributes;
|
CORE_mutex_Attributes Attributes;
|
||||||
unsigned32 lock;
|
unsigned32 lock;
|
||||||
unsigned32 nest_count;
|
unsigned32 nest_count;
|
||||||
|
unsigned32 blocked_count;
|
||||||
Thread_Control *holder;
|
Thread_Control *holder;
|
||||||
Objects_Id holder_id;
|
Objects_Id holder_id;
|
||||||
} CORE_mutex_Control;
|
} CORE_mutex_Control;
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ void _CORE_mutex_Initialize(
|
|||||||
|
|
||||||
the_mutex->Attributes = *the_mutex_attributes;
|
the_mutex->Attributes = *the_mutex_attributes;
|
||||||
the_mutex->lock = initial_lock;
|
the_mutex->lock = initial_lock;
|
||||||
|
the_mutex->blocked_count = 0;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if ( !the_mutex_attributes->only_owner_release &&
|
if ( !the_mutex_attributes->only_owner_release &&
|
||||||
|
|||||||
@@ -119,6 +119,7 @@ typedef struct {
|
|||||||
CORE_mutex_Attributes Attributes;
|
CORE_mutex_Attributes Attributes;
|
||||||
unsigned32 lock;
|
unsigned32 lock;
|
||||||
unsigned32 nest_count;
|
unsigned32 nest_count;
|
||||||
|
unsigned32 blocked_count;
|
||||||
Thread_Control *holder;
|
Thread_Control *holder;
|
||||||
Objects_Id holder_id;
|
Objects_Id holder_id;
|
||||||
} CORE_mutex_Control;
|
} CORE_mutex_Control;
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ void _CORE_mutex_Initialize(
|
|||||||
|
|
||||||
the_mutex->Attributes = *the_mutex_attributes;
|
the_mutex->Attributes = *the_mutex_attributes;
|
||||||
the_mutex->lock = initial_lock;
|
the_mutex->lock = initial_lock;
|
||||||
|
the_mutex->blocked_count = 0;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if ( !the_mutex_attributes->only_owner_release &&
|
if ( !the_mutex_attributes->only_owner_release &&
|
||||||
|
|||||||
Reference in New Issue
Block a user