diff --git a/examples/aadlv2/ping/ping.adb b/examples/aadlv2/ping/ping.adb index 4cf50f3546965b60423369fdffd701f3c841c114..eeb64f32376dc7b4737453bf98009766a4a6a29a 100644 --- a/examples/aadlv2/ping/ping.adb +++ b/examples/aadlv2/ping/ping.adb @@ -51,7 +51,7 @@ package body Ping is begin Order := not Order; Data_Source := Order; - Put_Line (Normal, "Sending ORDER: " & Opaque_Type'Image (Order)); + Put_Line (Normal, "Sending ORDER: " + Opaque_Type'Image (Order)); end Do_Ping_Spg; -------------------- @@ -63,14 +63,14 @@ package body Ping is Data_Source : out Simple_type) is begin - Put_Line (Normal, "ORDER: " & Opaque_Type'Image (Data_Sink)); + Put_Line (Normal, "ORDER: " + Opaque_Type'Image (Data_Sink)); if Data_Sink then Var := Var + 1; - Put_Line (Normal, "Sending (+1) PING" & Simple_Type'Image (Var)); + Put_Line (Normal, "Sending (+1) PING" + Simple_Type'Image (Var)); else Var := Var + 5; - Put_Line (Normal, "Sending (+5) PING" & Simple_Type'Image (Var)); + Put_Line (Normal, "Sending (+5) PING" + Simple_Type'Image (Var)); end if; Data_Source := Var; diff --git a/src/polyorb_hi-aperiodic_task.adb b/src/polyorb_hi-aperiodic_task.adb index 9bd5dfc2232f2aa7c766c0a7132b19d9e2d3b542..9e178d54a4165188953bfbdacbded7a5923a6704 100644 --- a/src/polyorb_hi-aperiodic_task.adb +++ b/src/polyorb_hi-aperiodic_task.adb @@ -64,8 +64,8 @@ package body PolyORB_HI.Aperiodic_Task is (Put_Line (Verbose, "Aperiodic Task " - & Entity_Image (Entity) - & ": Wait initialization")); + + Entity_Image (Entity) + + ": Wait initialization")); Suspend_Until_True (Task_Suspension_Objects (Entity)); delay until System_Startup_Time; @@ -73,7 +73,7 @@ package body PolyORB_HI.Aperiodic_Task is pragma Debug (Put_Line (Verbose, "Aperiodic task initialized for entity " - & Entity_Image (Entity))); + + Entity_Image (Entity))); -- Main task loop @@ -83,8 +83,8 @@ package body PolyORB_HI.Aperiodic_Task is (Put_Line (Verbose, "Aperiodic Task " - & Entity_Image (Entity) - & ": New Dispatch")); + + Entity_Image (Entity) + + ": New Dispatch")); -- Block until an event is received @@ -94,8 +94,8 @@ package body PolyORB_HI.Aperiodic_Task is (Put_Line (Verbose, "Aperiodic Task " - & Entity_Image (Entity) - & ": received event")); + + Entity_Image (Entity) + + ": received event")); -- Execute the job diff --git a/src/polyorb_hi-background_task.adb b/src/polyorb_hi-background_task.adb index 9c7083299b6e698f1c24c37e7a53e2cf1d40e2b5..954b4b05e9fd6f5837c27fcb218924a8ad3eea3b 100644 --- a/src/polyorb_hi-background_task.adb +++ b/src/polyorb_hi-background_task.adb @@ -63,8 +63,8 @@ package body PolyORB_HI.Background_Task is (Put_Line (Verbose, "Background Task " - & Entity_Image (Entity) - & ": Wait initialization")); + + Entity_Image (Entity) + + ": Wait initialization")); Suspend_Until_True (Task_Suspension_Objects (Entity)); delay until System_Startup_Time; @@ -72,14 +72,14 @@ package body PolyORB_HI.Background_Task is pragma Debug (Put_Line (Verbose, "Background task initialized for entity " - & Entity_Image (Entity))); + + Entity_Image (Entity))); pragma Debug (Put_Line (Verbose, "Background Task " - & Entity_Image (Entity) - & ": Run job")); + + Entity_Image (Entity) + + ": Run job")); Error := Job; diff --git a/src/polyorb_hi-hybrid_task.adb b/src/polyorb_hi-hybrid_task.adb index 56e327fe4c068926aeffca3ee035c9d98f937de4..b367b5216c19c2ce849b664e910b66515566677d 100644 --- a/src/polyorb_hi-hybrid_task.adb +++ b/src/polyorb_hi-hybrid_task.adb @@ -65,8 +65,8 @@ package body PolyORB_HI.Hybrid_Task is (Put_Line (Verbose, "Hybrid Task " - & Entity_Image (Entity) - & ": Wait initialization")); + + Entity_Image (Entity) + + ": Wait initialization")); Suspend_Until_True (Task_Suspension_Objects (Entity)); delay until System_Startup_Time; @@ -74,7 +74,7 @@ package body PolyORB_HI.Hybrid_Task is pragma Debug (Put_Line (Verbose, "Hybrid task initialized for entity " - & Entity_Image (Entity))); + + Entity_Image (Entity))); -- Run the initialize entrypoint (if any) @@ -87,8 +87,8 @@ package body PolyORB_HI.Hybrid_Task is (Put_Line (Verbose, "Hybrid Task " - & Entity_Image (Entity) - & ": New Dispatch")); + + Entity_Image (Entity) + + ": New Dispatch")); -- Block until an event is received @@ -98,8 +98,8 @@ package body PolyORB_HI.Hybrid_Task is (Put_Line (Verbose, "Hybrid Task " - & Entity_Image (Entity) - & ": received event")); + + Entity_Image (Entity) + + ": received event")); -- Calculate the next deadline according to the minimal -- inter-arrival time. diff --git a/src/polyorb_hi-hybrid_task_driver.adb b/src/polyorb_hi-hybrid_task_driver.adb index ee87644ef82148644e0b496138680a1903385d37..d4457e4acd90f3931344ab3b77b451ce2a63aace 100644 --- a/src/polyorb_hi-hybrid_task_driver.adb +++ b/src/polyorb_hi-hybrid_task_driver.adb @@ -104,7 +104,7 @@ package body PolyORB_HI.Hybrid_Task_Driver is (Put_Line (Verbose, "Hybrid thread driver: Triggering task: " - & Entity_Image (T.The_Task))); + + Entity_Image (T.The_Task))); Trigger (T); end if; @@ -144,7 +144,7 @@ package body PolyORB_HI.Hybrid_Task_Driver is (Put_Line (Verbose, "Hybrid thread driver: Eligible task: " - & Entity_Image (T.The_Task))); + + Entity_Image (T.The_Task))); T.Eligible := True; end if; diff --git a/src/polyorb_hi-output.adb b/src/polyorb_hi-output.adb index cfa5ee965ee91aef5a465ff5be004c9fc8557eee..efbaca0261178f17bf9759844ea0b6ba2baf5e95 100644 --- a/src/polyorb_hi-output.adb +++ b/src/polyorb_hi-output.adb @@ -39,12 +39,23 @@ with System; package body PolyORB_HI.Output is use Ada.Real_Time; + procedure Unprotected_Put_Line (Text : in String); + -- Not thread-safe Put_Line function + + procedure Unprotected_Put (Text : in String); + -- Not thread-safe Put function + + ---------- + -- Lock -- + ---------- + protected Lock is + -- This lock has been defined to guarantee thread-safe output + -- display + procedure Put (Text : in String); - -- To guarantee thread-safe output display procedure Put_Line (Text : in String); - -- To guarantee thread-safe output display private pragma Priority (System.Priority'Last); @@ -180,4 +191,17 @@ package body PolyORB_HI.Output is Put_Line (Mode, Output); end Dump; + --------- + -- "+" -- + --------- + + function "+" (S1 : String; S2 : String) return String is + S : String (1 .. S1'Length + S2'Length); + begin + S (1 .. S1'Length) := S1 (S1'First .. S1'Last); + S (S1'Length + 1 .. S'Last) := S2 (S2'First .. S2'Last); + + return S; + end "+"; + end PolyORB_HI.Output; diff --git a/src/polyorb_hi-output.ads b/src/polyorb_hi-output.ads index cbf8de8bed8ff552f24df8a7e6530f585121ab84..c2617424f671a4ac4ee43015f5cdcaee240ce821 100644 --- a/src/polyorb_hi-output.ads +++ b/src/polyorb_hi-output.ads @@ -63,25 +63,20 @@ package PolyORB_HI.Output is procedure Put_Line (Text : in String); -- As above but always displays the message - procedure Unprotected_Put_Line (Text : in String); - -- As above but this routine is not thread-safe - procedure Put (Mode : in Verbosity := Normal; Text : in String); -- Display Text iff Mode is greater than Current_Mode. This -- routine is thread-safe. procedure Put (Text : in String); - -- As above but displays the message reguards less the mode - - procedure Unprotected_Put (Text : in String); - -- As above but this routine is not thread-safe + -- As above but always displays the message procedure Dump (Stream : Stream_Element_Array; Mode : Verbosity := Verbose); -- Dump the content of Stream in an hexadecimal format + function "+" (S1 : String; S2 : String) return String; + private pragma Inline (Put_Line); - pragma Inline (Unprotected_Put_Line); end PolyORB_HI.Output; diff --git a/src/polyorb_hi-periodic_task.adb b/src/polyorb_hi-periodic_task.adb index 841221aaca4ae2f2d4d62614da333f2f1fc0e3c2..0c6037e457cde8f822d07b012724ba0433e31e6c 100644 --- a/src/polyorb_hi-periodic_task.adb +++ b/src/polyorb_hi-periodic_task.adb @@ -63,8 +63,8 @@ package body PolyORB_HI.Periodic_Task is (Put_Line (Verbose, "Periodic Task " - & Entity_Image (Entity) - & ": Wait initialization")); + + Entity_Image (Entity) + + ": Wait initialization")); Suspend_Until_True (Task_Suspension_Objects (Entity)); Next_Start := System_Startup_Time + Dispatch_Offset; @@ -81,7 +81,7 @@ package body PolyORB_HI.Periodic_Task is pragma Debug (Put_Line (Verbose, - "Periodic Task " & Entity_Image (Entity) & ": New Cycle")); + "Periodic Task " + Entity_Image (Entity) + ": New Cycle")); -- Execute the task's job @@ -94,8 +94,8 @@ package body PolyORB_HI.Periodic_Task is -- T := Ada.Real_Time.Clock; -- if T > Next_Start then -- Put_Line (Normal, "***** Overload detected in task " - -- & Entity_Image (Entity) & " *****"); - -- Put_Line (Normal, "Lag: " & + -- + Entity_Image (Entity) + " *****"); + -- Put_Line (Normal, "Lag: " + -- Duration'Image (To_Duration (Next_Start - T))); -- end if; diff --git a/src/polyorb_hi-sporadic_task.adb b/src/polyorb_hi-sporadic_task.adb index 32b7c2ac5ff327779c39fdb5724de8a9b26d8ef9..9d80b63cde719d600a67a6146f5c57f13694a906 100644 --- a/src/polyorb_hi-sporadic_task.adb +++ b/src/polyorb_hi-sporadic_task.adb @@ -67,8 +67,8 @@ package body PolyORB_HI.Sporadic_Task is (Put_Line (Verbose, "Sporadic Task " - & Entity_Image (Entity) - & ": Wait initialization")); + + Entity_Image (Entity) + + ": Wait initialization")); Suspend_Until_True (Task_Suspension_Objects (Entity)); -- delay until System_Startup_Time; @@ -76,7 +76,7 @@ package body PolyORB_HI.Sporadic_Task is pragma Debug (Put_Line (Verbose, "Sporadic task initialized for entity " - & Entity_Image (Entity))); + + Entity_Image (Entity))); -- Main task loop @@ -86,8 +86,8 @@ package body PolyORB_HI.Sporadic_Task is (Put_Line (Verbose, "Sporadic Task " - & Entity_Image (Entity) - & ": New Dispatch")); + + Entity_Image (Entity) + + ": New Dispatch")); -- Block until an event is received @@ -97,8 +97,8 @@ package body PolyORB_HI.Sporadic_Task is (Put_Line (Verbose, "Sporadic Task " - & Entity_Image (Entity) - & ": received event")); + + Entity_Image (Entity) + + ": received event")); -- Calculate the next start time according to the minimal -- inter-arrival time. diff --git a/src/polyorb_hi-suspenders.adb b/src/polyorb_hi-suspenders.adb index 3d651ec509daa732b7652726e3bd9f7d02108c1e..01fa19930158b1119114816eb4ae82d8ffc63d80 100644 --- a/src/polyorb_hi-suspenders.adb +++ b/src/polyorb_hi-suspenders.adb @@ -72,15 +72,15 @@ package body PolyORB_HI.Suspenders is pragma Debug (Put_Line (Verbose, "Unblocking task " - & PolyORB_HI_Generated.Deployment.Entity_Image (J))); + + PolyORB_HI_Generated.Deployment.Entity_Image (J))); Set_True (Task_Suspension_Objects (J)); pragma Debug (Put_Line (Verbose, "Task " - & PolyORB_HI_Generated.Deployment.Entity_Image (J) - & " unblocked")); + + PolyORB_HI_Generated.Deployment.Entity_Image (J) + + " unblocked")); end loop; end Unblock_All_Tasks; diff --git a/src/polyorb_hi-thread_interrogators.adb b/src/polyorb_hi-thread_interrogators.adb index 0c0e04bc613883cd49f78b2e608b61b05571a1d3..340a8f164ba613b7ee48306dc6d5a6ace9ddd6c9 100644 --- a/src/polyorb_hi-thread_interrogators.adb +++ b/src/polyorb_hi-thread_interrogators.adb @@ -244,8 +244,8 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Wait_Event: oldest unread event port = " - & Thread_Port_Images (P))); + + ": Wait_Event: oldest unread event port = " + + Thread_Port_Images (P))); end Wait_Event; ---------------- @@ -262,8 +262,8 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Read_Event: read valid event [data] on " - & Thread_Port_Images (P))); + + ": Read_Event: read valid event [data] on " + + Thread_Port_Images (P))); end if; end Read_Event; @@ -291,8 +291,8 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Dequeue: Empty queue for " - & Thread_Port_Images (T))); + + ": Dequeue: Empty queue for " + + Thread_Port_Images (T))); P := Get_Most_Recent_Value (T); @@ -303,8 +303,8 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Dequeue: NO FIFO for " - & Thread_Port_Images (T))); + + ": Dequeue: NO FIFO for " + + Thread_Port_Images (T))); P := Get_Most_Recent_Value (T); @@ -312,8 +312,8 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Dequeue: dequeuing " - & Thread_Port_Images (T))); + + ": Dequeue: dequeuing " + + Thread_Port_Images (T))); if First = Last then -- Update the value of N_Empties only when this is the @@ -368,32 +368,32 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Read_In: Empty queue for port " - & Thread_Port_Images (T) - & ". Reading the last stored value.")); + + ": Read_In: Empty queue for port " + + Thread_Port_Images (T) + + ". Reading the last stored value.")); P := Get_Most_Recent_Value (T); else pragma Debug (Put_Line (Verbose, CE - & ": Read_In: Reading the oldest element in the" - & " queue of port " - & Thread_Port_Images (T))); + + ": Read_In: Reading the oldest element in the" + + " queue of port " + + Thread_Port_Images (T))); P := Global_Data_Queue (First + Offset - 1); pragma Debug (Put_Line (Verbose, CE - & ": Read_In: Global reading position: " - & Integer'Image (First + Offset - 1))); + + ": Read_In: Global reading position: " + + Integer'Image (First + Offset - 1))); end if; pragma Debug (Put_Line (Verbose, CE - & ": Read_In: Value read from port " - & Thread_Port_Images (T))); + + ": Read_In: Value read from port " + + Thread_Port_Images (T))); return P; end Read_In; @@ -409,8 +409,8 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Read_Out: Value read from port " - & Thread_Port_Images (T))); + + ": Read_Out: Value read from port " + + Thread_Port_Images (T))); return Most_Recent_Values (T); end Read_Out; @@ -433,8 +433,8 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Set_Invalid: Setting INVALID for sending: port " - & Thread_Port_Images (T))); + + ": Set_Invalid: Setting INVALID for sending: port " + + Thread_Port_Images (T))); Value_Put (T) := False; end Set_Invalid; @@ -490,10 +490,10 @@ package body PolyORB_HI.Thread_Interrogators is (Put_Line (Verbose, CE - & ": Store_In: FIFO is full." - & " Dropping oldest element." - & " Global storage position: " - & Integer'Image (First + Offset - 1))); + + ": Store_In: FIFO is full." + + " Dropping oldest element." + + " Global storage position: " + + Integer'Image (First + Offset - 1))); Last := First; @@ -540,10 +540,10 @@ package body PolyORB_HI.Thread_Interrogators is (Put_Line (Verbose, CE - & ": Store_In: FIFO is full." - & " Dropping newest element" - & " Global storage position: " - & Integer'Image (Last + Offset - 1))); + + ": Store_In: FIFO is full." + + " Dropping newest element" + + " Global storage position: " + + Integer'Image (Last + Offset - 1))); -- Search the newest element in the history @@ -568,7 +568,7 @@ package body PolyORB_HI.Thread_Interrogators is end if; when Error => raise Program_Error with - CE & ": Store_In: FIFO is full"; + CE + ": Store_In: FIFO is full"; end case; -- Remove event in the history and shift @@ -578,9 +578,9 @@ package body PolyORB_HI.Thread_Interrogators is (Put_Line (Verbose, CE - & ": Store_In: FIFO is full." - & " Removed element in history at" - & Integer'Image (Frst))); + + ": Store_In: FIFO is full." + + " Removed element in history at" + + Integer'Image (Frst))); loop exit when Frst = Global_Data_Queue_Size @@ -622,8 +622,8 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Store_In: Global storage position: " - & Integer'Image (Last + Offset - 1))); + + ": Store_In: Global storage position: " + + Integer'Image (Last + Offset - 1))); end if; @@ -684,17 +684,17 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Store_In: Insert event" - & " in history at: " - & Integer'Image (1))); + + ": Store_In: Insert event" + + " in history at: " + + Integer'Image (1))); else GDH (Frst + 1) := PT; pragma Debug (Put_Line (Verbose, CE - & ": Store_In: Insert event" - & " in history at: " - & Integer'Image (Frst + 1))); + + ": Store_In: Insert event" + + " in history at: " + + Integer'Image (Frst + 1))); end if; end; @@ -707,9 +707,9 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Store_In: Enqueued Event [Data] message" - & " for port " - & Thread_Port_Images (PT))); + + ": Store_In: Enqueued Event [Data] message" + + " for port " + + Thread_Port_Images (PT))); -- Update the barrier @@ -724,16 +724,16 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Store_In: Storing Data message in DATA port " - & Thread_Port_Images (PT))); + + ": Store_In: Storing Data message in DATA port " + + Thread_Port_Images (PT))); Set_Most_Recent_Value (PT, P, T); pragma Debug (Put_Line (Verbose, CE - & ": Store_In: Stored Data message in DATA port " - & Thread_Port_Images (PT))); + + ": Store_In: Stored Data message in DATA port " + + Thread_Port_Images (PT))); end if; end Store_In; @@ -750,8 +750,8 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Store_Out: Storing value for sending: port " - & Thread_Port_Images (PT))); + + ": Store_Out: Storing value for sending: port " + + Thread_Port_Images (PT))); -- Mark as valid for sending @@ -760,8 +760,8 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Store_Out: Value stored for sending: port " - & Thread_Port_Images (PT))); + + ": Store_Out: Value stored for sending: port " + + Thread_Port_Images (PT))); -- No need to go through the Set_ routine since we are -- sending, not receiving. @@ -793,32 +793,32 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Count: Not initialized port: " - & Thread_Port_Images (T))); + + ": Count: Not initialized port: " + + Thread_Port_Images (T))); return -1; elsif Is_Empty then pragma Debug (Put_Line (Verbose, CE - & ": Count: Empty FIFO for port " - & Thread_Port_Images (T))); + + ": Count: Empty FIFO for port " + + Thread_Port_Images (T))); return 0; elsif Fifo_Size = 0 then pragma Debug (Put_Line (Verbose, CE - & ": Count: No FIFO for port " - & Thread_Port_Images (T))); + + ": Count: No FIFO for port " + + Thread_Port_Images (T))); return 0; else pragma Debug (Put_Line (Verbose, CE - & ": Count: FIFO exists for port " - & Thread_Port_Images (T))); + + ": Count: FIFO exists for port " + + Thread_Port_Images (T))); if Last >= First then -- First configuration @@ -864,8 +864,8 @@ package body PolyORB_HI.Thread_Interrogators is (Put_Line (Verbose, CE - & ": Get_Most_Recent_Value: event [data] port " - & Thread_Port_Images (P))); + + ": Get_Most_Recent_Value: event [data] port " + + Thread_Port_Images (P))); S := Most_Recent_Values (P); end if; @@ -878,33 +878,33 @@ package body PolyORB_HI.Thread_Interrogators is (Put_Line (Verbose, CE - & ": Get_Most_Recent_Value: data port " - & Thread_Port_Images (P) - & ". Immediate connection")); + + ": Get_Most_Recent_Value: data port " + + Thread_Port_Images (P) + + ". Immediate connection")); pragma Debug (Put_Line (Verbose, CE - & ": Get_Most_Recent_Value: First =" - & Integer'Image (First))); + + ": Get_Most_Recent_Value: First =" + + Integer'Image (First))); pragma Debug (Put_Line (Verbose, CE - & ": Get_Most_Recent_Value: Last = " - & Integer'Image (Last))); + + ": Get_Most_Recent_Value: Last = " + + Integer'Image (Last))); pragma Debug (Put_Line (Verbose, CE - & ": Get_Most_Recent_Value: Offset = " - & Integer'Image (Offset))); + + ": Get_Most_Recent_Value: Offset = " + + Integer'Image (Offset))); pragma Debug (Put_Line (Verbose, CE - & ": Get_Most_Recent_Value: Global_Data_Queue_Size = " - & Integer'Image (Global_Data_Queue_Size))); + + ": Get_Most_Recent_Value: Global_Data_Queue_Size = " + + Integer'Image (Global_Data_Queue_Size))); S := Global_Data_Queue (First + Offset - 1); @@ -912,10 +912,10 @@ package body PolyORB_HI.Thread_Interrogators is (Put_Line (Verbose, CE - & ": Get_Most_Recent_Value: Most recent value for" - & " data port " - & Thread_Port_Images (P) - & " got. Immediate connection")); + + ": Get_Most_Recent_Value: Most recent value for" + + " data port " + + Thread_Port_Images (P) + + " got. Immediate connection")); else -- Delayed connection: The element indexed by First is -- the oldest element and the element indexed by Last @@ -925,44 +925,44 @@ package body PolyORB_HI.Thread_Interrogators is (Put_Line (Verbose, CE - & ": Get_Most_Recent_Value: data port " - & Thread_Port_Images (P) - & ". Delayed connection")); + + ": Get_Most_Recent_Value: data port " + + Thread_Port_Images (P) + + ". Delayed connection")); pragma Debug (Put_Line (Verbose, CE - & ": Get_Most_Recent_Value: First = " - & Integer'Image (First))); + + ": Get_Most_Recent_Value: First = " + + Integer'Image (First))); pragma Debug (Put_Line (Verbose, CE - & ": Get_Most_Recent_Value: Last = " - & Integer'Image (Last))); + + ": Get_Most_Recent_Value: Last = " + + Integer'Image (Last))); pragma Debug (Put_Line (Verbose, - " Offset = " & Integer'Image (Offset))); + " Offset = " + Integer'Image (Offset))); pragma Debug (Put_Line (Verbose, CE - & ": Get_Most_Recent_Value: Global_Data_Queue_Size = " - & Integer'Image (Global_Data_Queue_Size))); + + ": Get_Most_Recent_Value: Global_Data_Queue_Size = " + + Integer'Image (Global_Data_Queue_Size))); if Time_Stamps (P) <= T then pragma Debug (Put_Line (Verbose, - CE & ": Get_Most_Recent_Value: Getting NEW value")); + CE + ": Get_Most_Recent_Value: Getting NEW value")); S := Global_Data_Queue (Last + Offset - 1); else pragma Debug (Put_Line (Verbose, - CE & ": Get_Most_Recent_Value: Getting OLD value")); + CE + ": Get_Most_Recent_Value: Getting OLD value")); S := Global_Data_Queue (First + Offset - 1); end if; @@ -971,10 +971,10 @@ package body PolyORB_HI.Thread_Interrogators is (Put_Line (Verbose, CE - & ": Get_Most_Recent_Value: Most recent value" - & " for data port " - & Thread_Port_Images (P) - & " got. Delayed connection")); + + ": Get_Most_Recent_Value: Most recent value" + + " for data port " + + Thread_Port_Images (P) + + " got. Delayed connection")); end if; end if; @@ -1001,17 +1001,17 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Set_Most_Recent_Value: event [data] port " - & Thread_Port_Images (P))); + + ": Set_Most_Recent_Value: event [data] port " + + Thread_Port_Images (P))); Most_Recent_Values (P) := S; pragma Debug (Put_Line (Verbose, CE - & ": Set_Most_Recent_Value: event [data] port " - & Thread_Port_Images (P) - & ". Done.")); + + ": Set_Most_Recent_Value: event [data] port " + + Thread_Port_Images (P) + + ". Done.")); end if; end if; if not Is_Event (P_Kind) then @@ -1024,33 +1024,33 @@ package body PolyORB_HI.Thread_Interrogators is (Put_Line (Verbose, CE - & ": Set_Most_Recent_Value: data port " - & Thread_Port_Images (P) - & ". Immediate connection")); + + ": Set_Most_Recent_Value: data port " + + Thread_Port_Images (P) + + ". Immediate connection")); pragma Debug (Put_Line (Verbose, CE - & ": Set_Most_Recent_Value: First =" - & Integer'Image (First))); + + ": Set_Most_Recent_Value: First =" + + Integer'Image (First))); pragma Debug (Put_Line (Verbose, CE - & ": Set_Most_Recent_Value: Last = " - & Integer'Image (Last))); + + ": Set_Most_Recent_Value: Last = " + + Integer'Image (Last))); pragma Debug (Put_Line (Verbose, CE - & ": Set_Most_Recent_Value: Offset = " - & Integer'Image (Offset))); + + ": Set_Most_Recent_Value: Offset = " + + Integer'Image (Offset))); pragma Debug (Put_Line (Verbose, CE - & ": Set_Most_Recent_Value: Global_Data_Queue_Size = " - & Integer'Image (Global_Data_Queue_Size))); + + ": Set_Most_Recent_Value: Global_Data_Queue_Size = " + + Integer'Image (Global_Data_Queue_Size))); Global_Data_Queue (First + Offset - 1) := S; @@ -1058,10 +1058,10 @@ package body PolyORB_HI.Thread_Interrogators is (Put_Line (Verbose, CE - & ": Set_Most_Recent_Value: Most recent value" - & " for data port " - & Thread_Port_Images (P) - & " set. Immediate connection")); + + ": Set_Most_Recent_Value: Most recent value" + + " for data port " + + Thread_Port_Images (P) + + " set. Immediate connection")); else -- Delayed connection: The element indexed by First must be -- the oldest element and the element indexed by Last @@ -1071,31 +1071,31 @@ package body PolyORB_HI.Thread_Interrogators is (Put_Line (Verbose, CE - & ": Set_Most_Recent_Value: data port " - & Thread_Port_Images (P) - & ". Delayed connection")); + + ": Set_Most_Recent_Value: data port " + + Thread_Port_Images (P) + + ". Delayed connection")); pragma Debug (Put_Line (Verbose, CE - & ": Set_Most_Recent_Value: First = " - & Integer'Image (First))); + + ": Set_Most_Recent_Value: First = " + + Integer'Image (First))); pragma Debug (Put_Line (Verbose, CE - & ": Set_Most_Recent_Value: Last = " - & Integer'Image (Last))); + + ": Set_Most_Recent_Value: Last = " + + Integer'Image (Last))); pragma Debug (Put_Line (Verbose, - " Offset = " & Integer'Image (Offset))); + " Offset = " + Integer'Image (Offset))); pragma Debug (Put_Line (Verbose, CE - & ": Set_Most_Recent_Value: Global_Data_Queue_Size = " - & Integer'Image (Global_Data_Queue_Size))); + + ": Set_Most_Recent_Value: Global_Data_Queue_Size = " + + Integer'Image (Global_Data_Queue_Size))); Global_Data_Queue (First + Offset - 1) := Global_Data_Queue (Last + Offset - 1); @@ -1105,10 +1105,10 @@ package body PolyORB_HI.Thread_Interrogators is (Put_Line (Verbose, CE - & ": Set_Most_Recent_Value: Most recent value" - & " for data port " - & Thread_Port_Images (P) - & " set. Delayed connection")); + + ": Set_Most_Recent_Value: Most recent value" + + " for data port " + + Thread_Port_Images (P) + + " set. Delayed connection")); end if; end if; end Set_Most_Recent_Value; @@ -1122,8 +1122,8 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Get_Time_Stamp: port " - & Thread_Port_Images (P))); + + ": Get_Time_Stamp: port " + + Thread_Port_Images (P))); return Time_Stamps (P); end Get_Time_Stamp; @@ -1156,16 +1156,16 @@ package body PolyORB_HI.Thread_Interrogators is begin pragma Debug (Put_Line (Verbose, CE - & ": Send_Output: port " - & Thread_Port_Images (Port))); + + ": Send_Output: port " + + Thread_Port_Images (Port))); -- If no valid value is to be sent, quit if Global_Queue.Is_Invalid (Port) then pragma Debug (Put_Line (Verbose, CE - & ": Send_Output: Invalid value in port " - & Thread_Port_Images (Port))); + + ": Send_Output: Invalid value in port " + + Thread_Port_Images (Port))); null; else -- Mark the port value as invalid to impede future sendings @@ -1196,10 +1196,10 @@ package body PolyORB_HI.Thread_Interrogators is (Put_Line (Verbose, CE - & ": Send_Output: to port " - & PolyORB_HI_Generated.Deployment.Port_Image (Dst (To)) - & " of " - & Entity_Image (Port_Table (Dst (To))))); + + ": Send_Output: to port " + + PolyORB_HI_Generated.Deployment.Port_Image (Dst (To)) + + " of " + + Entity_Image (Port_Table (Dst (To))))); Error := Protocols.Send (Current_Entity, Port_Table (Dst (To)), @@ -1214,9 +1214,9 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Send_Output: port " - & Thread_Port_Images (Port) - & ". End.")); + + ": Send_Output: port " + + Thread_Port_Images (Port) + + ". End.")); end if; return Error; @@ -1228,7 +1228,7 @@ package body PolyORB_HI.Thread_Interrogators is procedure Put_Value (Thread_Interface : Thread_Interface_Type) is begin - pragma Debug (Put_Line (Verbose, CE & ": Put_Value")); + pragma Debug (Put_Line (Verbose, CE + ": Put_Value")); Global_Queue.Store_Out ((Current_Entity, Interface_To_Stream (Thread_Interface)), @@ -1242,7 +1242,7 @@ package body PolyORB_HI.Thread_Interrogators is procedure Receive_Input (Port : Port_Type) is pragma Unreferenced (Port); begin - raise Program_Error with CE & ": Receive_Input: Not implemented yet"; + raise Program_Error with CE + ": Receive_Input: Not implemented yet"; end Receive_Input; --------------- @@ -1256,9 +1256,9 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Get_Value: Value of port " - & Thread_Port_Images (Port) - & " got")); + + ": Get_Value: Value of port " + + Thread_Port_Images (Port) + + " got")); return T_Port; end Get_Value; @@ -1272,10 +1272,10 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Get_Sender: Value of sender to port " - & Thread_Port_Images (Port) - & " = " - & Entity_Image (Sender))); + + ": Get_Sender: Value of sender to port " + + Thread_Port_Images (Port) + + " = " + + Entity_Image (Sender))); return Sender; end Get_Sender; @@ -1288,10 +1288,10 @@ package body PolyORB_HI.Thread_Interrogators is begin pragma Debug (Put_Line (Verbose, CE - & ": Get_Count: port " - & Thread_Port_Images (Port) - & " =" - & Integer'Image (Count))); + + ": Get_Count: port " + + Thread_Port_Images (Port) + + " =" + + Integer'Image (Count))); return Count; end Get_Count; @@ -1305,8 +1305,8 @@ package body PolyORB_HI.Thread_Interrogators is begin pragma Debug (Put_Line (Verbose, CE - & ": Next_Value for port " - & Thread_Port_Images (Port))); + + ": Next_Value for port " + + Thread_Port_Images (Port))); Global_Queue.Dequeue (Port, P); end Next_Value; @@ -1317,16 +1317,16 @@ package body PolyORB_HI.Thread_Interrogators is procedure Wait_For_Incoming_Events (Port : out Port_Type) is begin - pragma Debug (Put_Line (Verbose, CE & ": Wait_For_Incoming_Events")); + pragma Debug (Put_Line (Verbose, CE + ": Wait_For_Incoming_Events")); Global_Queue.Wait_Event (Port); pragma Debug (Put_Line (Verbose, CE - & ": Wait_For_Incoming_Events: reception of" - & " event [Data] message on port " - & Thread_Port_Images (Port))); + + ": Wait_For_Incoming_Events: reception of" + + " event [Data] message on port " + + Thread_Port_Images (Port))); end Wait_For_Incoming_Events; -------------------- @@ -1341,15 +1341,15 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": Get_Next_Event: read event [data] message" - & " for port " - & Thread_Port_Images (Port))); + + ": Get_Next_Event: read event [data] message" + + " for port " + + Thread_Port_Images (Port))); null; else pragma Debug (Put_Line (Verbose, CE - & ": Get_Next_Event: Nothing to read.")); + + ": Get_Next_Event: Nothing to read.")); null; end if; end Get_Next_Event; @@ -1364,7 +1364,7 @@ package body PolyORB_HI.Thread_Interrogators is Time_Stamp : Ada.Real_Time.Time := Ada.Real_Time.Clock) is begin - pragma Debug (Put_Line (Verbose, CE & ": Store_Received_Message")); + pragma Debug (Put_Line (Verbose, CE + ": Store_Received_Message")); Global_Queue.Store_In ((From, Interface_To_Stream (Thread_Interface)), Time_Stamp); @@ -1394,8 +1394,8 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": H_Increment_First: F =" - & Integer'Image (F))); + + ": H_Increment_First: F =" + + Integer'Image (F))); end H_Increment_First; ---------------------- @@ -1413,8 +1413,8 @@ package body PolyORB_HI.Thread_Interrogators is pragma Debug (Put_Line (Verbose, CE - & ": H_Increment_Last: L =" - & Integer'Image (L))); + + ": H_Increment_Last: L =" + + Integer'Image (L))); end H_Increment_Last; -------- diff --git a/src/polyorb_hi-transport_low_level_sockets.adb b/src/polyorb_hi-transport_low_level_sockets.adb index a1b059ffe5cb293535d8cff53159a897bd26e0fc..828fecb7f767bf9ce15cee883387e624ab82f50e 100644 --- a/src/polyorb_hi-transport_low_level_sockets.adb +++ b/src/polyorb_hi-transport_low_level_sockets.adb @@ -158,7 +158,7 @@ package body PolyORB_HI.Transport_Low_Level is pragma Debug (Put_Line (Verbose, "Local socket created for " - & Image (Nodes (My_Node).Address))); + + Image (Nodes (My_Node).Address))); end if; -- Start the protocol handler task @@ -179,7 +179,7 @@ package body PolyORB_HI.Transport_Low_Level is pragma Debug (Put_Line (Verbose, - "Try to connect to " & Image (Nodes (N).Address))); + "Try to connect to " + Image (Nodes (N).Address))); delay until Next_Time; @@ -198,14 +198,14 @@ package body PolyORB_HI.Transport_Low_Level is pragma Debug (Put_Line (Verbose, - "Connected to " & Image (Nodes (N).Address))); + "Connected to " + Image (Nodes (N).Address))); end if; end loop; Suspend_Until_True (Other_Nodes_Init); pragma Debug (Put_Line (Verbose, "Initialization of socket subsystem" - & " is complete")); + + " is complete")); -- Unblock the receiver task @@ -244,7 +244,7 @@ package body PolyORB_HI.Transport_Low_Level is if Nodes (My_Node).Address.Addr /= No_Inet_Addr then pragma Debug (Put_Line (Verbose, "Waiting on " - & Image (Nodes (My_Node).Address))); + + Image (Nodes (My_Node).Address))); for N in Nodes'Range loop if N /= My_Node then @@ -262,7 +262,7 @@ package body PolyORB_HI.Transport_Low_Level is Node := Corresponding_Node (Unsigned_8 (SEC (SEC'First))); Nodes (Node).Socket_Receive := Socket; pragma Debug (Put_Line (Verbose, "Connection from node " - & Node_Image (Node))); + + Node_Image (Node))); end if; end loop; @@ -304,15 +304,15 @@ package body PolyORB_HI.Transport_Low_Level is -- Receive message length Receive_Socket (Nodes (N).Socket_Receive, SEL, SEO); - pragma Debug (Put_Line (Verbose, "SEL " & SEL'Length'Img - & "MLS" & Message_Length_Size'Img)); + pragma Debug (Put_Line (Verbose, "SEL " + SEL'Length'Img + + "MLS" + Message_Length_Size'Img)); -- Receiving zero byte means that peer is dead if SEO = 0 then pragma Debug (Put_Line (Verbose, - "Node " & Node_Image (N) - & " is dead")); + "Node " + Node_Image (N) + + " is dead")); exit Main_Loop; end if; @@ -321,8 +321,8 @@ package body PolyORB_HI.Transport_Low_Level is pragma Debug (Put_Line (Verbose, "received" - & AS.Stream_Element_Offset'Image (SEO) - & " bytes from node " & Node_Image (N))); + + AS.Stream_Element_Offset'Image (SEO) + + " bytes from node " + Node_Image (N))); -- Get the message and preserve message length to keep -- compatible with a local message delivery. @@ -346,10 +346,10 @@ package body PolyORB_HI.Transport_Low_Level is when E : others => pragma Debug (Put_Line (Normal, "Exception " - & Ada.Exceptions.Exception_Name (E))); + + Ada.Exceptions.Exception_Name (E))); pragma Debug (Put_Line (Normal, "Message " - & Ada.Exceptions.Exception_Message (E))); + + Ada.Exceptions.Exception_Message (E))); null; end Receiver_Task; @@ -373,7 +373,7 @@ package body PolyORB_HI.Transport_Low_Level is for Msg'Address use Message'Address; begin - pragma Debug (Put_Line (Verbose, "Sending message, size:" & L'Img)); + pragma Debug (Put_Line (Verbose, "Sending message, size:" + L'Img)); Send_Socket (Nodes (Node).Socket_Send, Msg, L); return Error_Kind'(Error_None); @@ -381,10 +381,10 @@ package body PolyORB_HI.Transport_Low_Level is when E : others => pragma Debug (Put_Line (Normal, "Exception " - & Ada.Exceptions.Exception_Name (E))); + + Ada.Exceptions.Exception_Name (E))); pragma Debug (Put_Line (Normal, "Message " - & Ada.Exceptions.Exception_Message (E))); + + Ada.Exceptions.Exception_Message (E))); return Error_Kind'(Error_Transport); end Send;