From: Ronan Desplanques Date: Tue, 4 Nov 2025 16:23:13 +0000 (+0100) Subject: ada: Fix mistake in recent patch X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01d332a6cd251c13010d446e6b416d8a36957759;p=thirdparty%2Fgcc.git 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 --git a/gcc/ada/libgnarl/s-taspri__mingw.ads b/gcc/ada/libgnarl/s-taspri__mingw.ads index b0fe8855b0d..b882a910b9c 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;