Beispiel #1
0
void _API_Mutex_Allocate(
  API_Mutex_Control **the_mutex
)
{
  API_Mutex_Control *mutex;

  mutex = (API_Mutex_Control *)
    _Objects_Allocate_unprotected( &_API_Mutex_Information );

  _Assert( mutex != NULL );

  _CORE_recursive_mutex_Initialize( &mutex->Mutex );

  _Objects_Open_u32( &_API_Mutex_Information, &mutex->Object, 1 );

  *the_mutex = mutex;
}
Beispiel #2
0
void _API_Mutex_Allocate(
  API_Mutex_Control **the_mutex
)
{
  API_Mutex_Control *mutex;

  CORE_mutex_Attributes attr =  {
    CORE_MUTEX_NESTING_ACQUIRES,
    true,
    CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT,
    0
  };

  mutex = (API_Mutex_Control *)
    _Objects_Allocate_unprotected( &_API_Mutex_Information );

  _Assert( mutex != NULL );

  _CORE_mutex_Initialize( &mutex->Mutex, NULL, &attr, false );

  _Objects_Open_u32( &_API_Mutex_Information, &mutex->Object, 1 );

  *the_mutex = mutex;
}