Commit 3b37ffbf by Jose Ruiz Committed by Arnaud Charlet

s-tposen.adb (Service_Entry): The object must be always unlocked at the end of…

s-tposen.adb (Service_Entry): The object must be always unlocked at the end of this procedure now that the...

2004-10-04  Jose Ruiz  <ruiz@act-europe.fr>

	* s-tposen.adb (Service_Entry): The object must be always unlocked at
	the end of this procedure now that the unlock operation was inserted
	by the expander.

From-SVN: r88489
parent b23e28d5
2004-10-04 Jose Ruiz <ruiz@act-europe.fr> 2004-10-04 Jose Ruiz <ruiz@act-europe.fr>
* s-tposen.adb (Service_Entry): The object must be always unlocked at
the end of this procedure now that the unlock operation was inserted
by the expander.
2004-10-04 Jose Ruiz <ruiz@act-europe.fr>
* targparm.ads, targparm.adb (Targparm_Tags): Add PAS value * targparm.ads, targparm.adb (Targparm_Tags): Add PAS value
corresponding to the Preallocated_Stacks flags in System. corresponding to the Preallocated_Stacks flags in System.
(Get_Target_Parameters): Including the processing for (Get_Target_Parameters): Including the processing for
......
...@@ -574,43 +574,48 @@ package body System.Tasking.Protected_Objects.Single_Entry is ...@@ -574,43 +574,48 @@ package body System.Tasking.Protected_Objects.Single_Entry is
------------------- -------------------
procedure Service_Entry (Object : Protection_Entry_Access) is procedure Service_Entry (Object : Protection_Entry_Access) is
Self_Id : constant Task_Id := STPO.Self; Self_Id : constant Task_Id := STPO.Self;
Entry_Call : constant Entry_Call_Link := Object.Entry_Queue; Entry_Call : constant Entry_Call_Link := Object.Entry_Queue;
Caller : Task_Id; Caller : Task_Id;
begin begin
if Entry_Call /= null then if Entry_Call /= null
if Object.Entry_Body.Barrier (Object.Compiler_Info, 1) then and then Object.Entry_Body.Barrier (Object.Compiler_Info, 1)
Object.Entry_Queue := null; then
Object.Entry_Queue := null;
if Object.Call_In_Progress /= null then if Object.Call_In_Progress /= null then
-- This violates the No_Entry_Queue restriction, send
-- Program_Error to the caller.
Send_Program_Error (Self_Id, Entry_Call); -- Violation of No_Entry_Queue restriction, raise exception
Unlock_Entry (Object);
return;
end if;
Object.Call_In_Progress := Entry_Call; Send_Program_Error (Self_Id, Entry_Call);
Object.Entry_Body.Action
(Object.Compiler_Info, Entry_Call.Uninterpreted_Data, 1);
Object.Call_In_Progress := null;
Caller := Entry_Call.Self;
Unlock_Entry (Object); Unlock_Entry (Object);
return;
end if;
if Single_Lock then Object.Call_In_Progress := Entry_Call;
STPO.Lock_RTS; Object.Entry_Body.Action
end if; (Object.Compiler_Info, Entry_Call.Uninterpreted_Data, 1);
Object.Call_In_Progress := null;
Caller := Entry_Call.Self;
Unlock_Entry (Object);
STPO.Write_Lock (Caller); if Single_Lock then
Wakeup_Entry_Caller (Self_Id, Entry_Call, Done); STPO.Lock_RTS;
STPO.Unlock (Caller); end if;
if Single_Lock then STPO.Write_Lock (Caller);
STPO.Unlock_RTS; Wakeup_Entry_Caller (Self_Id, Entry_Call, Done);
end if; STPO.Unlock (Caller);
if Single_Lock then
STPO.Unlock_RTS;
end if; end if;
else
-- Just unlock the entry
Unlock_Entry (Object);
end if; end if;
exception exception
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment