https://gcc.gnu.org/g:01d332a6cd251c13010d446e6b416d8a36957759
commit r16-5377-g01d332a6cd251c13010d446e6b416d8a36957759 Author: Ronan Desplanques <[email protected]> Date: Tue Nov 4 17:23:13 2025 +0100 ada: Fix mistake in recent patch A recent patch removed the wrong record definition in s-taspri__mingw.ads, this patch fixes that mistake. gcc/ada/ChangeLog: * libgnarl/s-taspri__mingw.ads (Suspension_Object): Remove. (Private_Data): Revert unintentional removal. Diff: --- gcc/ada/libgnarl/s-taspri__mingw.ads | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/gcc/ada/libgnarl/s-taspri__mingw.ads b/gcc/ada/libgnarl/s-taspri__mingw.ads index b0fe8855b0d8..b882a910b9cb 100644 --- a/gcc/ada/libgnarl/s-taspri__mingw.ads +++ b/gcc/ada/libgnarl/s-taspri__mingw.ads @@ -67,21 +67,23 @@ private type Condition_Variable is new System.Win32.HANDLE; - type Suspension_Object is record - State : Boolean; - pragma Atomic (State); - -- Boolean that indicates whether the object is open. This field is - -- marked Atomic to ensure that we can read its value without locking - -- the access to the Suspension_Object. + type Private_Data is limited record + Thread : aliased System.OS_Interface.Thread_Id; + pragma Atomic (Thread); + -- Thread field may be updated by two different threads of control. + -- (See, Enter_Task and Create_Task in s-taprop.adb). + -- They put the same value (thr_self value). We do not want to + -- use lock on those operations and the only thing we have to + -- make sure is that they are updated in atomic fashion. - Waiting : Boolean; - -- Flag showing if there is a task already suspended on this object + Thread_Id : aliased Win32.DWORD; + -- Used to provide a better tasking support in gdb - L : aliased System.OS_Locks.RTS_Lock; - -- Protection for ensuring mutual exclusion on the Suspension_Object + CV : aliased Condition_Variable; + -- Condition Variable used to implement Sleep/Wakeup - CV : aliased Win32.HANDLE; - -- Condition variable used to queue threads until condition is signaled + L : aliased System.OS_Locks.RTS_Lock; + -- Protection for all components is lock L end record; end System.Task_Primitives;
