"Philippe Laval" a �crit dans le message de news: 3E257FD5.8765352C@obs-vlfr.fr... > The following program compiles without error in gnat 3.14p. > However the line "From H: P is now released" never shows up. What is > wrong? > > -- File Susp_O.adb > with P_Pkg; > with H_Pkg; > procedure Susp_O is > begin > null; > end Susp_O; > ---------------------------------------------------------------------------------------------- > > -- File P_Pkg.ads > with Ada.Synchronous_Task_Control; use Ada.Synchronous_Task_Control; > package P_Pkg is > protected type Protected_Lock is > procedure Set_Lock; > procedure Release; > private > Lock : Suspension_Object; > end Protected_Lock; > > type Lock_Access is access Protected_Lock; > Attack_Lock : Lock_Access; > > task P; > > end P_Pkg; > > ------------------------------------------------------------------------------------------------ > > -- File P_Pkg.ads > package H_Pkg is > task H; > end H_Pkg; > ------------------------------------------------------------------------------------------------ > > -- File P_Pkg.adb > with Ada.Text_IO; use Ada.Text_IO; > package body P_Pkg is > protected body Protected_Lock is > procedure Set_Lock is > begin > Suspend_Until_True (Lock); > end Set_Lock; > Suspend_Until_True is a potentially blocking operation, and therefore not allowed in a protected procedure. (D.10(10)) -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr