Re: [PATCH 08/11] Cygwin: testsuite: Busy-wait in cancel3 and cancel5

2023-07-18 Thread Jon Turney
On 18/07/2023 13:09, Corinna Vinschen wrote: On Jul 18 12:20, Jon Turney wrote: On 17/07/2023 16:41, Corinna Vinschen wrote: Looking into pthread::cancel we have this order of things: // cancel deferred mutex.unlock (); canceled = true; SetEvent (cancel_event);

Re: [PATCH 00/11] More testsuite fixes

2023-07-18 Thread Corinna Vinschen
On Jul 18 14:37, Jon Turney wrote: > On 17/07/2023 15:02, Corinna Vinschen wrote: > > > > > We can't neatly tuck the pthread_cleanup_push/pop inside the object, as > > > they are implemented as macros which must appear in the same lexical > > > scope. > > > > You could do it if you call the

Re: [PATCH 00/11] More testsuite fixes

2023-07-18 Thread Jon Turney
On 17/07/2023 15:02, Corinna Vinschen wrote: We can't neatly tuck the pthread_cleanup_push/pop inside the object, as they are implemented as macros which must appear in the same lexical scope. You could do it if you call the underlying functions instead. pthread_cleanup_push is just a

Re: [PATCH 08/11] Cygwin: testsuite: Busy-wait in cancel3 and cancel5

2023-07-18 Thread Corinna Vinschen
On Jul 18 12:20, Jon Turney wrote: > On 17/07/2023 16:41, Corinna Vinschen wrote: > > > Looking into pthread::cancel we have this order of things: > > > > > > // cancel deferred > > > mutex.unlock (); > > > canceled = true; > > > SetEvent (cancel_event); > > > return 0; >

Re: [PATCH 08/11] Cygwin: testsuite: Busy-wait in cancel3 and cancel5

2023-07-18 Thread Jon Turney
On 17/07/2023 16:41, Corinna Vinschen wrote: On Jul 17 16:21, Corinna Vinschen wrote: On Jul 17 12:51, Jon Turney wrote: On 17/07/2023 12:05, Corinna Vinschen wrote: diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index f614e01c42f6..fceb9bda1806 100644 ---