Lines Matching refs:Self_ID

88    procedure Task_Wrapper (Self_ID : Task_Id);
105 procedure Vulnerable_Complete_Task (Self_ID : Task_Id);
110 procedure Vulnerable_Complete_Master (Self_ID : Task_Id);
115 procedure Vulnerable_Complete_Activation (Self_ID : Task_Id);
119 procedure Abort_Dependents (Self_ID : Task_Id);
139 procedure Abort_Dependents (Self_ID : Task_Id) is
157 if P = Self_ID then
158 if C.Master_Of_Task = Self_ID.Master_Within then
160 (Debug.Trace (Self_ID, "Aborting", 'X', C));
161 Utilities.Abort_One_Task (Self_ID, C);
169 Self_ID.Dependents_Aborted := True;
208 Self_ID : constant Task_Id := STPO.Self; constant
221 and then Self_ID.Common.Protected_Action_Nesting > 0
227 (Debug.Trace (Self_ID, "Activate_Tasks", 'C'));
229 Initialization.Defer_Abort_Nestable (Self_ID);
231 pragma Assert (Self_ID.Common.Wait_Count = 0);
262 Initialization.Undefer_Abort_Nestable (Self_ID);
279 (if C.Common.Base_Priority < Get_Priority (Self_ID)
280 then Get_Priority (Self_ID)
304 pragma Assert (Self_ID /= P);
332 Self_ID.Common.Activation_Failed := True;
344 Write_Lock (Self_ID);
345 Self_ID.Common.State := Activator_Sleep;
358 Self_ID.Common.Wait_Count := Self_ID.Common.Wait_Count + 1;
371 exit when Self_ID.Common.Wait_Count = 0;
372 Sleep (Self_ID, Activator_Sleep);
375 Self_ID.Common.State := Runnable;
376 Unlock (Self_ID);
381 Initialization.Undefer_Abort_Nestable (Self_ID);
383 if Self_ID.Common.Activation_Failed then
384 Self_ID.Common.Activation_Failed := False;
394 Self_ID : constant Task_Id := STPO.Self; constant
397 Initialization.Defer_Abort_Nestable (Self_ID);
398 Vulnerable_Complete_Activation (Self_ID);
399 Initialization.Undefer_Abort_Nestable (Self_ID);
410 Self_ID : constant Task_Id := STPO.Self; constant
413 (Self_ID.Deferral_Level > 0
415 Vulnerable_Complete_Master (Self_ID);
425 Self_ID : constant Task_Id := STPO.Self; constant
429 (Self_ID.Deferral_Level > 0
432 Vulnerable_Complete_Task (Self_ID);
463 Self_ID : constant Task_Id := STPO.Self; constant
480 if Self_ID.Master_Of_Task /= Foreign_Task_Level
481 and then Master > Self_ID.Master_Within
491 and then Self_ID.Common.Protected_Action_Nesting > 0
496 pragma Debug (Debug.Trace (Self_ID, "Create_Task", 'C'));
500 then Self_ID.Common.Base_Priority
528 then Self_ID.Common.Base_CPU
539 P := Self_ID;
549 Initialization.Defer_Abort_Nestable (Self_ID);
555 Initialization.Undefer_Abort_Nestable (Self_ID);
564 Write_Lock (Self_ID);
569 if not Self_ID.Callable then
570 pragma Assert (Self_ID.Pending_ATC_Level = Level_Completed_Task);
571 pragma Assert (Self_ID.Pending_Action);
575 Unlock (Self_ID);
577 Initialization.Undefer_Abort_Nestable (Self_ID);
585 Initialize_ATCB (Self_ID, State, Discriminants, P, Elaborated,
590 Unlock (Self_ID);
592 Initialization.Undefer_Abort_Nestable (Self_ID);
640 Unlock (Self_ID);
651 Initialization.Undefer_Abort_Nestable (Self_ID);
681 Initialization.Undefer_Abort_Nestable (Self_ID);
688 Initialization.Undefer_Abort_Nestable (Self_ID);
692 (Self_ID, "Created task in " & T.Master_Of_Task'Img, 'C', T));
709 Self_ID : constant Task_Id := STPO.Self; constant
711 Self_ID.Master_Within := Self_ID.Master_Within + 1;
714 (Self_ID, "Enter_Master ->" & Self_ID.Master_Within'Img, 'M'));
724 Self_ID : constant Task_Id := STPO.Self; constant
731 (Debug.Trace (Self_ID, "Expunge_Unactivated_Tasks", 'C'));
733 Initialization.Defer_Abort_Nestable (Self_ID);
767 Initialization.Undefer_Abort_Nestable (Self_ID);
785 Self_ID : constant Task_Id := STPO.Self; constant
800 if Self_ID.Deferral_Level = 0 then
807 Initialization.Defer_Abort_Nestable (Self_ID);
814 pragma Assert (Self_ID = Environment_Task);
819 Self_ID.Callable := False;
828 Abort_Dependents (Self_ID);
835 Write_Lock (Self_ID);
855 (Self_ID, 0.01, System.OS_Primitives.Relative,
856 Self_ID.Common.State, Ignore_1, Ignore_2);
864 (Self_ID, 0.01, System.OS_Primitives.Relative,
865 Self_ID.Common.State, Ignore_1, Ignore_2);
867 Unlock (Self_ID);
871 Vulnerable_Complete_Task (Self_ID);
944 Self_ID : constant Task_Id := STPO.Self; constant
949 (Debug.Trace (Self_ID, "Move_Activation_Chain", 'C'));
960 Initialization.Defer_Abort_Nestable (Self_ID);
980 Initialization.Undefer_Abort_Nestable (Self_ID);
994 procedure Task_Wrapper (Self_ID : Task_Id) is
1065 pragma Assert (Self_ID.Deferral_Level = 1);
1068 (Self_ID, Self_ID.Common.Parent, Self_ID.Master_Of_Task);
1071 Self_ID.Common.Task_Alternate_Stack := Task_Alternate_Stack'Address;
1077 Stack_Guard (Self_ID, True);
1082 Enter_Task (Self_ID);
1105 Natural (Self_ID.Common.
1113 Stack_Base := Self_ID.Common.Compiler_Data.Pri_Stack_Info.Base;
1136 (Self_ID.Common.Analyzer,
1137 Self_ID.Common.Task_Image (1 .. Self_ID.Common.Task_Image_Len),
1138 Natural (Self_ID.Common.Compiler_Data.Pri_Stack_Info.Size),
1142 Fill_Stack (Self_ID.Common.Analyzer);
1172 Self_ID.Deferral_Level := 0;
1176 Debug.Signal_Debug_Event (Debug.Debug_Event_Run, Self_ID);
1201 Self_ID.Common.Task_Entry_Point (Self_ID.Common.Task_Arg);
1202 Initialization.Defer_Abort_Nestable (Self_ID);
1213 Initialization.Defer_Abort_Nestable (Self_ID);
1221 if Self_ID.Terminate_Alternative then
1226 (Debug.Debug_Event_Terminated, Self_ID);
1233 (Debug.Debug_Event_Abort_Terminated, Self_ID);
1240 Initialization.Defer_Abort_Nestable (Self_ID);
1252 Trace_Unhandled_Exception_In_Task (Self_ID);
1265 (Debug.Debug_Event_Exception_Terminated, Self_ID);
1273 Write_Lock (Self_ID);
1275 if Self_ID.Common.Specific_Handler /= null then
1276 TH := Self_ID.Common.Specific_Handler;
1282 elsif Self_ID.Master_Of_Task /= Independent_Task_Level then
1290 Search_Fall_Back_Handler (Self_ID.Common.Parent);
1293 Unlock (Self_ID);
1299 TH.all (Cause, Self_ID, EO);
1311 Compute_Result (Self_ID.Common.Analyzer);
1312 Report_Result (Self_ID.Common.Analyzer);
1315 Terminate_Task (Self_ID);
1346 procedure Terminate_Task (Self_ID : Task_Id) is
1358 if Self_ID.Common.Activator /= null then
1359 Vulnerable_Complete_Task (Self_ID);
1362 Initialization.Task_Lock (Self_ID);
1364 Master_Of_Task := Self_ID.Master_Of_Task;
1378 Stack_Guard (Self_ID, False);
1380 Utilities.Make_Passive (Self_ID, Task_Completed => True);
1381 Deallocate := Self_ID.Free_On_Termination;
1383 pragma Assert (Check_Exit (Self_ID));
1385 SSL.Destroy_TSD (Self_ID.Common.Compiler_Data);
1386 Initialization.Final_Task_Unlock (Self_ID);
1393 Free_Task (Self_ID);
1406 Self_ID : constant Task_Id := STPO.Self; constant
1410 Initialization.Defer_Abort_Nestable (Self_ID);
1414 Initialization.Undefer_Abort_Nestable (Self_ID);
1469 procedure Vulnerable_Complete_Activation (Self_ID : Task_Id) is
1470 Activator : constant Task_Id := Self_ID.Common.Activator;
1473 pragma Debug (Debug.Trace (Self_ID, "V_Complete_Activation", 'C'));
1476 Write_Lock (Self_ID);
1478 pragma Assert (Self_ID.Common.Activator /= null);
1483 Self_ID.Common.Activator := null;
1501 if not Self_ID.Callable
1502 and then Self_ID.Pending_ATC_Level /= Level_Completed_Task
1507 Unlock (Self_ID);
1514 if Get_Priority (Self_ID) /= Self_ID.Common.Base_Priority then
1515 Write_Lock (Self_ID);
1516 Set_Priority (Self_ID, Self_ID.Common.Base_Priority);
1517 Unlock (Self_ID);
1525 procedure Vulnerable_Complete_Master (Self_ID : Task_Id) is
1528 CM : constant Master_Level := Self_ID.Master_Within;
1549 Write_Lock (Self_ID);
1553 if C.Common.Activator = Self_ID and then C.Master_Of_Task = CM then
1557 if C.Common.Parent = Self_ID and then C.Master_Of_Task = CM then
1570 Unlock (Self_ID);
1580 (Debug.Trace (Self_ID, "V_Complete_Master(" & CM'Img & ")", 'C'));
1582 pragma Assert (Self_ID.Common.Wait_Count = 0);
1584 (Self_ID.Deferral_Level > 0
1599 Write_Lock (Self_ID);
1606 if C.Common.Activator = Self_ID and then C.Master_Of_Task = CM then
1625 if C.Common.Parent = Self_ID and then C.Master_Of_Task = CM then
1629 Self_ID.Common.Wait_Count := Self_ID.Common.Wait_Count + 1;
1638 Self_ID.Common.State := Master_Completion_Sleep;
1639 Unlock (Self_ID);
1647 Write_Lock (Self_ID);
1650 exit when Self_ID.Common.Wait_Count = 0;
1654 if Self_ID.Pending_ATC_Level < Self_ID.ATC_Nesting_Level
1655 and then not Self_ID.Dependents_Aborted
1657 Unlock (Self_ID);
1659 Abort_Dependents (Self_ID);
1661 Write_Lock (Self_ID);
1664 (Debug.Trace (Self_ID, "master_completion_sleep", 'C'));
1665 Sleep (Self_ID, Master_Completion_Sleep);
1669 Self_ID.Common.State := Runnable;
1670 Unlock (Self_ID);
1677 if Self_ID.Alive_Count > 1 then
1684 pragma Assert (Self_ID.Common.Wait_Count = 0);
1689 Abort_Dependents (Self_ID);
1709 pragma Assert (Self_ID.Common.Wait_Count = 0);
1711 Write_Lock (Self_ID);
1715 if C.Common.Parent = Self_ID and then C.Master_Of_Task = CM then
1722 Self_ID.Common.Wait_Count := Self_ID.Common.Wait_Count + 1;
1731 Self_ID.Common.State := Master_Phase_2_Sleep;
1732 Unlock (Self_ID);
1737 Write_Lock (Self_ID);
1740 exit when Self_ID.Common.Wait_Count = 0;
1741 Sleep (Self_ID, Master_Phase_2_Sleep);
1744 Self_ID.Common.State := Runnable;
1745 Unlock (Self_ID);
1767 if C.Common.Parent = Self_ID
1842 Initialization.Task_Lock (Self_ID);
1852 Initialization.Task_Unlock (Self_ID);
1873 Self_ID.Master_Within := CM - 1;
1875 Debug.Master_Completed_Hook (Self_ID, CM);
1897 procedure Vulnerable_Complete_Task (Self_ID : Task_Id) is
1900 (Self_ID.Deferral_Level > 0
1902 pragma Assert (Self_ID = Self);
1904 (Self_ID.Master_Within in
1905 Self_ID.Master_Of_Task .. Self_ID.Master_Of_Task + 3);
1906 pragma Assert (Self_ID.Common.Wait_Count = 0);
1907 pragma Assert (Self_ID.Open_Accepts = null);
1908 pragma Assert (Self_ID.ATC_Nesting_Level = Level_No_ATC_Occurring);
1910 pragma Debug (Debug.Trace (Self_ID, "V_Complete_Task", 'C'));
1912 Write_Lock (Self_ID);
1913 Self_ID.Callable := False;
1920 Utilities.Cancel_Queued_Entry_Calls (Self_ID);
1921 Unlock (Self_ID);
1923 if Self_ID.Common.Activator /= null then
1924 Vulnerable_Complete_Activation (Self_ID);
1930 if Self_ID.Master_Within = Self_ID.Master_Of_Task + 2 then
1931 Vulnerable_Complete_Master (Self_ID);