Actual := First_Actual (N);
Formal := First_Formal (Ent);
-
while Present (Actual) loop
-- If it is a by_copy_type, copy it to a new variable. The
Append_To (Plist,
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Unchecked_Access,
- Prefix =>
+ Prefix =>
New_Reference_To (Defining_Identifier (N_Node), Loc)));
else
Pdecl :=
Make_Object_Declaration (Loc,
Defining_Identifier => P,
- Object_Definition =>
+ Object_Definition =>
New_Reference_To (Designated_Type (Ent_Acc), Loc),
- Expression =>
+ Expression =>
Make_Aggregate (Loc, Expressions => Plist));
Parm3 :=
else
if Present (Handled_Statement_Sequence (N)) then
- -- The call goes at the start of the statement sequence
- -- after the start of exception range label if one is present.
+ -- The call goes at the start of the statement sequence after
+ -- the start of exception range label if one is present.
declare
Stm : Node_Id;
else
Set_Handled_Statement_Sequence (N,
Make_Handled_Sequence_Of_Statements (Loc,
- Statements => New_List (Call)));
+ Statements => New_List (Call)));
end if;
end if;
Statements => New_List (
- -- Init (Args);
+ -- Init (Args);
Make_Procedure_Call_Statement (Loc,
- Name => New_Reference_To (Init, Loc),
+ Name => New_Reference_To (Init, Loc),
Parameter_Associations => Args),
- -- Activate_Tasks (_Chain);
+ -- Activate_Tasks (_Chain);
Make_Procedure_Call_Statement (Loc,
Name => New_Reference_To (RTE (RE_Activate_Tasks), Loc),
Make_Object_Declaration (Loc,
Defining_Identifier => Chain,
- Aliased_Present => True,
+ Aliased_Present => True,
Object_Definition =>
New_Reference_To (RTE (RE_Activation_Chain), Loc))),
if Comes_From_Source (T) then
Spec_Id :=
- Make_Defining_Identifier (Loc,
- Chars => New_External_Name (Chars (T), "TB"));
+ Make_Defining_Identifier (Loc, New_External_Name (Chars (T), "TB"));
-- Case of anonymous task type, suffix B
else
Spec_Id :=
- Make_Defining_Identifier (Loc,
- Chars => New_External_Name (Chars (T), 'B'));
+ Make_Defining_Identifier (Loc, New_External_Name (Chars (T), 'B'));
end if;
Set_Is_Internal (Spec_Id);
Append_To (Cdecls,
Make_Component_Declaration (Loc,
- Defining_Identifier =>
+ Defining_Identifier =>
Make_Defining_Identifier (Loc, Chars (Efam)),
Component_Definition =>
Subtype_Mark =>
New_Occurrence_Of (Efam_Type, Loc),
- Constraint =>
+ Constraint =>
Make_Index_Or_Discriminant_Constraint (Loc,
Constraints => New_List (
New_Occurrence_Of
(Etype (Discrete_Subtype_Definition
- (Parent (Efam))), Loc)))))));
+ (Parent (Efam))), Loc)))))));
end if;
-- assume that it can be called from an inner task, and therefore
-- cannot treat it as a local reference.
- elsif Is_Overloadable (Scop)
- and then In_Open_Scopes (T)
- then
+ elsif Is_Overloadable (Scop) and then In_Open_Scopes (T) then
return False;
else
return
Make_Selected_Component (Loc,
- Prefix =>
+ Prefix =>
Unchecked_Convert_To (Corresponding_Record_Type (Dtyp),
Make_Explicit_Dereference (Loc, N)),
Selector_Name => Make_Identifier (Loc, Sel));
if Restriction_Active (No_Task_Hierarchy) = False then
Call := Build_Runtime_Call (Sloc (N), RE_Enter_Master);
- -- The block may have no declarations, and nevertheless be a task
- -- master, if it contains a call that may return an object that
+ -- The block may have no declarations (and nevertheless be a task
+ -- master) if it contains a call that may return an object that
-- contains tasks.
if No (Declarations (N)) then
Next (Alt);
end loop;
- -- If we are the first accept statement, then we have to create
- -- the Ann variable, as for the stand alone case, except that
- -- it is inserted before the selective accept. Similarly, a
- -- label for requeue expansion must be declared.
+ -- If this is the first accept statement, then we have to
+ -- create the Ann variable, as for the stand alone case, except
+ -- that it is inserted before the selective accept. Similarly,
+ -- a label for requeue expansion must be declared.
if N = Accept_Statement (Alt) then
Ann := Make_Temporary (Loc, 'A');
Insert_Before_And_Analyze (Sel_Acc, Adecl);
- -- If we are not the first accept statement, then find the Ann
+ -- If this is not the first accept statement, then find the Ann
-- variable allocated by the first accept and use it.
else
-- The Ravenscar profile restricts barriers to simple variables declared
-- within the protected object. We also allow Boolean constants, since
-- these appear in several published examples and are also allowed by
- -- the Aonix compiler.
+ -- other compilers.
-- Note that after analysis variables in this context will be replaced
-- by the corresponding prival, that is to say a renaming of a selected
while Present (Tasknm) loop
Count := Count + 1;
- -- A task interface class-wide type object is being aborted.
- -- Retrieve its _task_id by calling a dispatching routine.
+ -- A task interface class-wide type object is being aborted. Retrieve
+ -- its _task_id by calling a dispatching routine.
if Ada_Version >= Ada_2005
and then Ekind (Etype (Tasknm)) = E_Class_Wide_Type
-- Expand_N_Accept_Statement --
-------------------------------
- -- This procedure handles expansion of accept statements that stand
- -- alone, i.e. they are not part of an accept alternative. The expansion
- -- of accept statement in accept alternatives is handled by the routines
+ -- This procedure handles expansion of accept statements that stand alone,
+ -- i.e. they are not part of an accept alternative. The expansion of
+ -- accept statement in accept alternatives is handled by the routines
-- Expand_N_Accept_Alternative and Expand_N_Selective_Accept. The
-- following description applies only to stand alone accept statements.
- -- If there is no handled statement sequence, or only null statements,
- -- then this is called a trivial accept, and the expansion is:
+ -- If there is no handled statement sequence, or only null statements, then
+ -- this is called a trivial accept, and the expansion is:
-- Accept_Trivial (entry-index)
-- an accept statement has no declarative part). In particular, if the
-- expander is active, the first such declaration is the declaration of
-- the Accept_Params_Ptr entity (see Sem_Ch9.Analyze_Accept_Statement).
- --
+
-- The two blocks are merged into a single block if the inner block has
-- no exception handlers, but otherwise two blocks are required, since
-- exceptions might be raised in the exception handlers of the inner
begin
D := First (Declarations (N));
-
while Present (D) loop
Next_D := Next (D);
if Nkind (D) = N_Object_Renaming_Declaration then
-- The job is to convert this to the asynchronous form
- -- If the trigger is a delay statement, it will have been expanded into a
- -- call to one of the GNARL delay procedures. This routine will convert
+ -- If the trigger is a delay statement, it will have been expanded into
+ -- a call to one of the GNARL delay procedures. This routine will convert
-- this into a protected entry call on a delay object and then continue
-- processing as for a protected entry call trigger. This requires
-- declaring a Delay_Block object and adding a pointer to this object to
pragma Polling (Off);
-- Turn off polling, we do not want polling to take place during tasking
--- operations. It can cause infinite loops and other problems.
+-- operations. It can cause infinite loops and other problems.
pragma Suppress (All_Checks);
-- Why is this required ???
procedure Wakeup_Entry_Caller (Entry_Call : Entry_Call_Link);
pragma Inline (Wakeup_Entry_Caller);
- -- This is called at the end of service of an entry call,
- -- to abort the caller if he is in an abortable part, and
- -- to wake up the caller if he is on Entry_Caller_Sleep.
- -- Call it holding the lock of Entry_Call.Self.
+ -- This is called at the end of service of an entry call, to abort the
+ -- caller if he is in an abortable part, and to wake up the caller if he
+ -- is on Entry_Caller_Sleep. Call it holding the lock of Entry_Call.Self.
procedure Wait_For_Completion (Entry_Call : Entry_Call_Link);
pragma Inline (Wait_For_Completion);
(Self_ID : Task_Id;
Entry_Call : Entry_Call_Link);
pragma Inline (Check_Exception);
- -- Raise any pending exception from the Entry_Call.
- -- This should be called at the end of every compiler interface procedure
- -- that implements an entry call.
- -- The caller should not be holding any locks, or there will be deadlock.
+ -- Raise any pending exception from the Entry_Call. This should be called
+ -- at the end of every compiler interface procedure that implements an
+ -- entry call. The caller should not be holding any locks, or there will
+ -- be deadlock.
procedure PO_Do_Or_Queue
(Object : Protection_Entry_Access;
Entry_Call : Entry_Call_Link);
- -- This procedure executes or queues an entry call, depending
- -- on the status of the corresponding barrier. It assumes that the
- -- specified object is locked.
+ -- This procedure executes or queues an entry call, depending on the status
+ -- of the corresponding barrier. The specified object is assumed locked.
---------------------
-- Check_Exception --
-- Send_Program_Error --
------------------------
- procedure Send_Program_Error (Entry_Call : Entry_Call_Link)
- is
+ procedure Send_Program_Error (Entry_Call : Entry_Call_Link) is
Caller : constant Task_Id := Entry_Call.Self;
+
begin
Entry_Call.Exception_To_Raise := Program_Error'Identity;
pragma Assert
(Caller.Common.State /= Terminated and then
Caller.Common.State /= Unactivated);
-
Entry_Call.State := Done;
STPO.Wakeup (Caller, Entry_Caller_Sleep);
end Wakeup_Entry_Caller;
procedure Exceptional_Complete_Single_Entry_Body
(Object : Protection_Entry_Access;
- Ex : Ada.Exceptions.Exception_Id) is
+ Ex : Ada.Exceptions.Exception_Id)
+ is
begin
Object.Call_In_Progress.Exception_To_Raise := Ex;
end Exceptional_Complete_Single_Entry_Body;
-- Lock_Entry --
----------------
- -- Compiler interface only.
+ -- Compiler interface only
+
-- Do not call this procedure from within the run-time system.
procedure Lock_Entry (Object : Protection_Entry_Access) is
-----------------------------------
function Protected_Single_Entry_Caller
- (Object : Protection_Entry) return Task_Id is
+ (Object : Protection_Entry) return Task_Id
+ is
begin
return Object.Call_In_Progress.Self;
end Protected_Single_Entry_Caller;