Lines Matching refs:Self_ID

93    procedure Task_Wrapper (Self_ID : Task_Id);
110 procedure Vulnerable_Complete_Task (Self_ID : Task_Id);
115 procedure Vulnerable_Complete_Master (Self_ID : Task_Id);
120 procedure Vulnerable_Complete_Activation (Self_ID : Task_Id);
124 procedure Abort_Dependents (Self_ID : Task_Id);
144 procedure Abort_Dependents (Self_ID : Task_Id) is
162 if P = Self_ID then
163 if C.Master_Of_Task = Self_ID.Master_Within then
165 (Debug.Trace (Self_ID, "Aborting", 'X', C));
166 Utilities.Abort_One_Task (Self_ID, C);
174 Self_ID.Dependents_Aborted := True;
213 Self_ID : constant Task_Id := STPO.Self; constant
226 and then Self_ID.Common.Protected_Action_Nesting > 0
232 (Debug.Trace (Self_ID, "Activate_Tasks", 'C'));
234 Initialization.Defer_Abort_Nestable (Self_ID);
236 pragma Assert (Self_ID.Common.Wait_Count = 0);
267 Initialization.Undefer_Abort_Nestable (Self_ID);
284 (if C.Common.Base_Priority < Get_Priority (Self_ID)
285 then Get_Priority (Self_ID)
309 pragma Assert (Self_ID /= P);
337 Self_ID.Common.Activation_Failed := True;
351 Write_Lock (Self_ID);
352 Self_ID.Common.State := Activator_Sleep;
365 Self_ID.Common.Wait_Count := Self_ID.Common.Wait_Count + 1;
378 exit when Self_ID.Common.Wait_Count = 0;
379 Sleep (Self_ID, Activator_Sleep);
382 Self_ID.Common.State := Runnable;
383 Unlock (Self_ID);
392 Initialization.Undefer_Abort_Nestable (Self_ID);
394 if Self_ID.Common.Activation_Failed then
395 Self_ID.Common.Activation_Failed := False;
405 Self_ID : constant Task_Id := STPO.Self; constant
408 Initialization.Defer_Abort_Nestable (Self_ID);
414 Vulnerable_Complete_Activation (Self_ID);
420 Initialization.Undefer_Abort_Nestable (Self_ID);
431 Self_ID : constant Task_Id := STPO.Self; constant
434 (Self_ID.Deferral_Level > 0
436 Vulnerable_Complete_Master (Self_ID);
446 Self_ID : constant Task_Id := STPO.Self; constant
450 (Self_ID.Deferral_Level > 0
453 Vulnerable_Complete_Task (Self_ID);
484 Self_ID : constant Task_Id := STPO.Self; constant
501 if Self_ID.Master_Of_Task /= Foreign_Task_Level
502 and then Master > Self_ID.Master_Within
512 and then Self_ID.Common.Protected_Action_Nesting > 0
517 pragma Debug (Debug.Trace (Self_ID, "Create_Task", 'C'));
521 then Self_ID.Common.Base_Priority
549 then Self_ID.Common.Base_CPU
560 P := Self_ID;
570 Initialization.Defer_Abort_Nestable (Self_ID);
576 Initialization.Undefer_Abort_Nestable (Self_ID);
585 Write_Lock (Self_ID);
590 if not Self_ID.Callable then
591 pragma Assert (Self_ID.Pending_ATC_Level = Level_Completed_Task);
592 pragma Assert (Self_ID.Pending_Action);
596 Unlock (Self_ID);
598 Initialization.Undefer_Abort_Nestable (Self_ID);
606 Initialize_ATCB (Self_ID, State, Discriminants, P, Elaborated,
611 Unlock (Self_ID);
613 Initialization.Undefer_Abort_Nestable (Self_ID);
661 Unlock (Self_ID);
672 Initialization.Undefer_Abort_Nestable (Self_ID);
702 Initialization.Undefer_Abort_Nestable (Self_ID);
709 Initialization.Undefer_Abort_Nestable (Self_ID);
713 (Self_ID, "Created task in " & T.Master_Of_Task'Img, 'C', T));
730 Self_ID : constant Task_Id := STPO.Self; constant
732 Self_ID.Master_Within := Self_ID.Master_Within + 1;
735 (Self_ID, "Enter_Master ->" & Self_ID.Master_Within'Img, 'M'));
745 Self_ID : constant Task_Id := STPO.Self; constant
752 (Debug.Trace (Self_ID, "Expunge_Unactivated_Tasks", 'C'));
754 Initialization.Defer_Abort_Nestable (Self_ID);
788 Initialization.Undefer_Abort_Nestable (Self_ID);
806 Self_ID : constant Task_Id := STPO.Self; constant
821 if Self_ID.Deferral_Level = 0 then
828 Initialization.Defer_Abort_Nestable (Self_ID);
835 pragma Assert (Self_ID = Environment_Task);
840 Self_ID.Callable := False;
850 Abort_Dependents (Self_ID);
860 Write_Lock (Self_ID);
880 (Self_ID, 0.01, System.OS_Primitives.Relative,
881 Self_ID.Common.State, Ignore_1, Ignore_2);
889 (Self_ID, 0.01, System.OS_Primitives.Relative,
890 Self_ID.Common.State, Ignore_1, Ignore_2);
892 Unlock (Self_ID);
900 Vulnerable_Complete_Task (Self_ID);
973 Self_ID : constant Task_Id := STPO.Self; constant
978 (Debug.Trace (Self_ID, "Move_Activation_Chain", 'C'));
989 Initialization.Defer_Abort_Nestable (Self_ID);
1009 Initialization.Undefer_Abort_Nestable (Self_ID);
1023 procedure Task_Wrapper (Self_ID : Task_Id) is
1094 pragma Assert (Self_ID.Deferral_Level = 1);
1097 (Self_ID, Self_ID.Common.Parent, Self_ID.Master_Of_Task);
1100 Self_ID.Common.Task_Alternate_Stack := Task_Alternate_Stack'Address;
1106 Stack_Guard (Self_ID, True);
1111 Enter_Task (Self_ID);
1135 Natural (Self_ID.Common.
1143 Stack_Base := Self_ID.Common.Compiler_Data.Pri_Stack_Info.Base;
1166 (Self_ID.Common.Analyzer,
1167 Self_ID.Common.Task_Image (1 .. Self_ID.Common.Task_Image_Len),
1168 Natural (Self_ID.Common.Compiler_Data.Pri_Stack_Info.Size),
1172 Fill_Stack (Self_ID.Common.Analyzer);
1202 Self_ID.Deferral_Level := 0;
1206 Debug.Signal_Debug_Event (Debug.Debug_Event_Run, Self_ID);
1225 Self_ID.Common.Task_Entry_Point (Self_ID.Common.Task_Arg);
1226 Initialization.Defer_Abort_Nestable (Self_ID);
1237 Initialization.Defer_Abort_Nestable (Self_ID);
1245 if Self_ID.Terminate_Alternative then
1250 (Debug.Debug_Event_Terminated, Self_ID);
1257 (Debug.Debug_Event_Abort_Terminated, Self_ID);
1264 Initialization.Defer_Abort_Nestable (Self_ID);
1276 Trace_Unhandled_Exception_In_Task (Self_ID);
1289 (Debug.Debug_Event_Exception_Terminated, Self_ID);
1301 Write_Lock (Self_ID);
1303 if Self_ID.Common.Specific_Handler /= null then
1304 TH := Self_ID.Common.Specific_Handler;
1310 elsif Self_ID.Master_Of_Task /= Independent_Task_Level then
1318 Search_Fall_Back_Handler (Self_ID.Common.Parent);
1321 Unlock (Self_ID);
1331 TH.all (Cause, Self_ID, EO);
1343 Compute_Result (Self_ID.Common.Analyzer);
1344 Report_Result (Self_ID.Common.Analyzer);
1347 Terminate_Task (Self_ID);
1378 procedure Terminate_Task (Self_ID : Task_Id) is
1390 if Self_ID.Common.Activator /= null then
1391 Vulnerable_Complete_Task (Self_ID);
1394 Initialization.Task_Lock (Self_ID);
1400 Master_Of_Task := Self_ID.Master_Of_Task;
1420 Stack_Guard (Self_ID, False);
1422 Utilities.Make_Passive (Self_ID, Task_Completed => True);
1423 Deallocate := Self_ID.Free_On_Termination;
1429 pragma Assert (Check_Exit (Self_ID));
1431 SSL.Destroy_TSD (Self_ID.Common.Compiler_Data);
1432 Initialization.Final_Task_Unlock (Self_ID);
1439 Free_Task (Self_ID);
1452 Self_ID : constant Task_Id := STPO.Self; constant
1456 Initialization.Defer_Abort_Nestable (Self_ID);
1470 Initialization.Undefer_Abort_Nestable (Self_ID);
1524 procedure Vulnerable_Complete_Activation (Self_ID : Task_Id) is
1525 Activator : constant Task_Id := Self_ID.Common.Activator;
1528 pragma Debug (Debug.Trace (Self_ID, "V_Complete_Activation", 'C'));
1531 Write_Lock (Self_ID);
1533 pragma Assert (Self_ID.Common.Activator /= null);
1538 Self_ID.Common.Activator := null;
1556 if not Self_ID.Callable
1557 and then Self_ID.Pending_ATC_Level /= Level_Completed_Task
1562 Unlock (Self_ID);
1569 if Get_Priority (Self_ID) /= Self_ID.Common.Base_Priority then
1570 Write_Lock (Self_ID);
1571 Set_Priority (Self_ID, Self_ID.Common.Base_Priority);
1572 Unlock (Self_ID);
1580 procedure Vulnerable_Complete_Master (Self_ID : Task_Id) is
1583 CM : constant Master_Level := Self_ID.Master_Within;
1607 Write_Lock (Self_ID);
1611 if C.Common.Activator = Self_ID and then C.Master_Of_Task = CM then
1615 if C.Common.Parent = Self_ID and then C.Master_Of_Task = CM then
1628 Unlock (Self_ID);
1641 (Debug.Trace (Self_ID, "V_Complete_Master(" & CM'Img & ")", 'C'));
1643 pragma Assert (Self_ID.Common.Wait_Count = 0);
1645 (Self_ID.Deferral_Level > 0
1660 Write_Lock (Self_ID);
1667 if C.Common.Activator = Self_ID and then C.Master_Of_Task = CM then
1686 if C.Common.Parent = Self_ID and then C.Master_Of_Task = CM then
1690 Self_ID.Common.Wait_Count := Self_ID.Common.Wait_Count + 1;
1699 Self_ID.Common.State := Master_Completion_Sleep;
1700 Unlock (Self_ID);
1711 Write_Lock (Self_ID);
1714 exit when Self_ID.Common.Wait_Count = 0;
1718 if Self_ID.Pending_ATC_Level < Self_ID.ATC_Nesting_Level
1719 and then not Self_ID.Dependents_Aborted
1722 Abort_Dependents (Self_ID);
1724 Unlock (Self_ID);
1726 Abort_Dependents (Self_ID);
1728 Write_Lock (Self_ID);
1732 (Debug.Trace (Self_ID, "master_completion_sleep", 'C'));
1733 Sleep (Self_ID, Master_Completion_Sleep);
1737 Self_ID.Common.State := Runnable;
1738 Unlock (Self_ID);
1745 if Self_ID.Alive_Count > 1 then
1752 pragma Assert (Self_ID.Common.Wait_Count = 0);
1760 Abort_Dependents (Self_ID);
1780 pragma Assert (Self_ID.Common.Wait_Count = 0);
1782 Write_Lock (Self_ID);
1786 if C.Common.Parent = Self_ID and then C.Master_Of_Task = CM then
1793 Self_ID.Common.Wait_Count := Self_ID.Common.Wait_Count + 1;
1802 Self_ID.Common.State := Master_Phase_2_Sleep;
1803 Unlock (Self_ID);
1811 Write_Lock (Self_ID);
1814 exit when Self_ID.Common.Wait_Count = 0;
1815 Sleep (Self_ID, Master_Phase_2_Sleep);
1818 Self_ID.Common.State := Runnable;
1819 Unlock (Self_ID);
1844 if C.Common.Parent = Self_ID
1919 Initialization.Task_Lock (Self_ID);
1929 Initialization.Task_Unlock (Self_ID);
1950 Self_ID.Master_Within := CM - 1;
1952 Debug.Master_Completed_Hook (Self_ID, CM);
1974 procedure Vulnerable_Complete_Task (Self_ID : Task_Id) is
1977 (Self_ID.Deferral_Level > 0
1979 pragma Assert (Self_ID = Self);
1981 (Self_ID.Master_Within in
1982 Self_ID.Master_Of_Task .. Self_ID.Master_Of_Task + 3);
1983 pragma Assert (Self_ID.Common.Wait_Count = 0);
1984 pragma Assert (Self_ID.Open_Accepts = null);
1985 pragma Assert (Self_ID.ATC_Nesting_Level = Level_No_ATC_Occurring);
1987 pragma Debug (Debug.Trace (Self_ID, "V_Complete_Task", 'C'));
1993 Write_Lock (Self_ID);
1994 Self_ID.Callable := False;
2001 Utilities.Cancel_Queued_Entry_Calls (Self_ID);
2002 Unlock (Self_ID);
2004 if Self_ID.Common.Activator /= null then
2005 Vulnerable_Complete_Activation (Self_ID);
2015 if Self_ID.Master_Within = Self_ID.Master_Of_Task + 2 then
2016 Vulnerable_Complete_Master (Self_ID);