===================================================================
@@ -291,15 +291,11 @@
else
declare
- Mutex_Attr : aliased pthread_mutexattr_t;
- Result : Interfaces.C.int;
+ Result : Interfaces.C.int;
begin
- Result := pthread_mutexattr_init (Mutex_Attr'Access);
- pragma Assert (Result = 0);
+ Result := pthread_mutex_init (L.WO'Access, null);
- Result := pthread_mutex_init (L.WO'Access, Mutex_Attr'Access);
-
pragma Assert (Result = 0 or else Result = ENOMEM);
if Result = ENOMEM then
@@ -315,15 +311,11 @@
is
pragma Unreferenced (Level);
- Mutex_Attr : aliased pthread_mutexattr_t;
- Result : Interfaces.C.int;
+ Result : Interfaces.C.int;
begin
- Result := pthread_mutexattr_init (Mutex_Attr'Access);
- pragma Assert (Result = 0);
+ Result := pthread_mutex_init (L, null);
- Result := pthread_mutex_init (L, Mutex_Attr'Access);
-
pragma Assert (Result = 0 or else Result = ENOMEM);
if Result = ENOMEM then
@@ -817,9 +809,8 @@
--------------------
procedure Initialize_TCB (Self_ID : Task_Id; Succeeded : out Boolean) is
- Mutex_Attr : aliased pthread_mutexattr_t;
- Cond_Attr : aliased pthread_condattr_t;
- Result : Interfaces.C.int;
+ Cond_Attr : aliased pthread_condattr_t;
+ Result : Interfaces.C.int;
begin
-- Give the task a unique serial number
@@ -831,11 +822,8 @@
Self_ID.Common.LL.Thread := Null_Thread_Id;
if not Single_Lock then
- Result := pthread_mutexattr_init (Mutex_Attr'Access);
- pragma Assert (Result = 0);
-
Result :=
- pthread_mutex_init (Self_ID.Common.LL.L'Access, Mutex_Attr'Access);
+ pthread_mutex_init (Self_ID.Common.LL.L'Access, null);
pragma Assert (Result = 0 or else Result = ENOMEM);
if Result /= 0 then
@@ -1081,9 +1069,8 @@
----------------
procedure Initialize (S : in out Suspension_Object) is
- Mutex_Attr : aliased pthread_mutexattr_t;
- Cond_Attr : aliased pthread_condattr_t;
- Result : Interfaces.C.int;
+ Cond_Attr : aliased pthread_condattr_t;
+ Result : Interfaces.C.int;
begin
-- Initialize internal state (always to False (RM D.10(6)))
@@ -1093,11 +1080,8 @@
-- Initialize internal mutex
- Result := pthread_mutexattr_init (Mutex_Attr'Access);
- pragma Assert (Result = 0);
+ Result := pthread_mutex_init (S.L'Access, null);
- Result := pthread_mutex_init (S.L'Access, Mutex_Attr'Access);
-
pragma Assert (Result = 0 or else Result = ENOMEM);
if Result = ENOMEM then