Self_Id.Common.State := Entry_Caller_Sleep;
- -- Try to remove calls to Sleep in the loop below by letting the caller
- -- a chance of getting ready immediately, using Unlock & Yield.
- -- See similar action in Wait_For_Call & Timed_Selective_Wait.
-
- STPO.Unlock (Self_Id);
-
- if Entry_Call.State < Done then
- STPO.Yield;
- end if;
-
- STPO.Write_Lock (Self_Id);
-
loop
Check_Pending_Actions_For_Entry_Call (Self_Id, Entry_Call);
Self_Id.Common.State := Acceptor_Delay_Sleep;
- -- Try to remove calls to Sleep in the loop below by letting the
- -- caller a chance of getting ready immediately, using Unlock
- -- Yield. See similar action in Wait_For_Completion/Wait_For_Call.
-
- Unlock (Self_Id);
-
- if Self_Id.Open_Accepts /= null then
- Yield;
- end if;
-
- Write_Lock (Self_Id);
-
-- Check if this task has been aborted while the lock was released
if Self_Id.Pending_ATC_Level < Self_Id.ATC_Nesting_Level then
begin
Self_Id.Common.State := Acceptor_Sleep;
- -- Try to remove calls to Sleep in the loop below by letting the caller
- -- a chance of getting ready immediately, using Unlock & Yield.
- -- See similar action in Wait_For_Completion & Timed_Selective_Wait.
-
- Unlock (Self_Id);
-
- if Self_Id.Open_Accepts /= null then
- Yield;
- end if;
-
- Write_Lock (Self_Id);
-
-- Check if this task has been aborted while the lock was released
if Self_Id.Pending_ATC_Level < Self_Id.ATC_Nesting_Level then