sem_prag.adb (Process_Convention): A dispatching call cannot have a stdcall calling convention.
2011-11-21 Pascal Obry <obry@adacore.com> * sem_prag.adb (Process_Convention): A dispatching call cannot have a stdcall calling convention. 2011-11-21 Pascal Obry <obry@adacore.com> * s-taprop-linux.adb (Initialize_Lock): Do not allocate a mutex attribute as not needed. (Initialize_TCB): Likewise. (Initialize): Likewise. From-SVN: r181564
This commit is contained in:
parent
a4901c0835
commit
a5dd23a728
@ -1,3 +1,15 @@
|
||||
2011-11-21 Pascal Obry <obry@adacore.com>
|
||||
|
||||
* sem_prag.adb (Process_Convention): A dispatching call cannot
|
||||
have a stdcall calling convention.
|
||||
|
||||
2011-11-21 Pascal Obry <obry@adacore.com>
|
||||
|
||||
* s-taprop-linux.adb (Initialize_Lock): Do not allocate a
|
||||
mutex attribute as not needed.
|
||||
(Initialize_TCB): Likewise.
|
||||
(Initialize): Likewise.
|
||||
|
||||
2011-11-21 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* sem_ch6.adb (Is_Public_Subprogram_For): New procedure
|
||||
|
@ -291,14 +291,10 @@ package body System.Task_Primitives.Operations is
|
||||
|
||||
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, Mutex_Attr'Access);
|
||||
Result := pthread_mutex_init (L.WO'Access, null);
|
||||
|
||||
pragma Assert (Result = 0 or else Result = ENOMEM);
|
||||
|
||||
@ -315,14 +311,10 @@ package body System.Task_Primitives.Operations is
|
||||
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, Mutex_Attr'Access);
|
||||
Result := pthread_mutex_init (L, null);
|
||||
|
||||
pragma Assert (Result = 0 or else Result = ENOMEM);
|
||||
|
||||
@ -817,9 +809,8 @@ package body System.Task_Primitives.Operations is
|
||||
--------------------
|
||||
|
||||
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 @@ package body System.Task_Primitives.Operations is
|
||||
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 @@ package body System.Task_Primitives.Operations is
|
||||
----------------
|
||||
|
||||
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,10 +1080,7 @@ package body System.Task_Primitives.Operations is
|
||||
|
||||
-- Initialize internal mutex
|
||||
|
||||
Result := pthread_mutexattr_init (Mutex_Attr'Access);
|
||||
pragma Assert (Result = 0);
|
||||
|
||||
Result := pthread_mutex_init (S.L'Access, Mutex_Attr'Access);
|
||||
Result := pthread_mutex_init (S.L'Access, null);
|
||||
|
||||
pragma Assert (Result = 0 or else Result = ENOMEM);
|
||||
|
||||
|
@ -3527,8 +3527,9 @@ package body Sem_Prag is
|
||||
-- For Stdcall, a subprogram, variable or subprogram type is required
|
||||
|
||||
if C = Convention_Stdcall
|
||||
and then not Is_Subprogram (E)
|
||||
and then not Is_Generic_Subprogram (E)
|
||||
and then
|
||||
((not Is_Subprogram (E) and then not Is_Generic_Subprogram (E))
|
||||
or else Is_Dispatching_Operation (E))
|
||||
and then Ekind (E) /= E_Variable
|
||||
and then not
|
||||
(Is_Access_Type (E)
|
||||
|
Loading…
Reference in New Issue
Block a user