Re: [Mingw-w64-public] [PATCH] Fix potential deadlock in pthread condition variable

2019-04-27 Thread NightStrike
On Mon, Apr 8, 2019, 10:37 AM Liu Hao wrote: > > I reformatted the code to a consistent layout to improve readability > > whilst I was trying to figure out how it worked. The original code had a > > variety of styles. Is there a "preferred" style? I noticed that other > > source have different st

Re: [Mingw-w64-public] [PATCH] Fix potential deadlock in pthread condition variable

2019-04-26 Thread Liu Hao
在 2019/4/12 9:49, Andrew Ng 写道: > I have attached a minimal patch that fixes the deadlock issue. > > The principle change to avoid deadlock, is to not wait whilst holding > the "waiters count lock". Because of this change to the locking, there > is an additional case required in the "signal" and "

Re: [Mingw-w64-public] [PATCH] Fix potential deadlock in pthread condition variable

2019-04-23 Thread Liu Hao
在 2019/4/23 下午11:30, Andrew Ng 写道: > Any feedback on this patch? > > I did have a look at this code in winpthreads, but failed to understand how it works. I would like to ask Kai for some details, but he hasn't been on IRC recently. -- Best regards, LH_Mouse signature.asc Description: Open

Re: [Mingw-w64-public] [PATCH] Fix potential deadlock in pthread condition variable

2019-04-23 Thread Andrew Ng
Any feedback on this patch? Cheers, Andrew On Fri, 12 Apr 2019 at 16:50, Andrew Ng wrote: > Sorry about that. I was hoping that a ".diff" file might make it through > to the mailing list, as I thought that I had seen other such file > attachments in some of the other messages. I'll stick to ".t

Re: [Mingw-w64-public] [PATCH] Fix potential deadlock in pthread condition variable

2019-04-12 Thread Andrew Ng
Sorry about that. I was hoping that a ".diff" file might make it through to the mailing list, as I thought that I had seen other such file attachments in some of the other messages. I'll stick to ".txt" files from now ;) Cheers, Andrew On Fri, 12 Apr 2019 at 23:46, JonY via Mingw-w64-public < min

Re: [Mingw-w64-public] [PATCH] Fix potential deadlock in pthread condition variable

2019-04-12 Thread Liu Hao
在 2019/4/12 22:45, JonY via Mingw-w64-public 写道: > On 4/12/19 1:49 AM, Andrew Ng wrote: >> I have attached a minimal patch that fixes the deadlock issue. >> >> The principle change to avoid deadlock, is to not wait whilst holding the >> "waiters count lock". Because of this change to the locking, t

Re: [Mingw-w64-public] [PATCH] Fix potential deadlock in pthread condition variable

2019-04-12 Thread JonY via Mingw-w64-public
On 4/12/19 1:49 AM, Andrew Ng wrote: > I have attached a minimal patch that fixes the deadlock issue. > > The principle change to avoid deadlock, is to not wait whilst holding the > "waiters count lock". Because of this change to the locking, there is an > additional case required in the "signal"

Re: [Mingw-w64-public] [PATCH] Fix potential deadlock in pthread condition variable

2019-04-11 Thread Andrew Ng
I have attached a minimal patch that fixes the deadlock issue. The principle change to avoid deadlock, is to not wait whilst holding the "waiters count lock". Because of this change to the locking, there is an additional case required in the "signal" and "broadcast" functions which handles when th

Re: [Mingw-w64-public] [PATCH] Fix potential deadlock in pthread condition variable

2019-04-08 Thread Liu Hao
在 2019/4/8 21:16, Andrew Ng 写道: > Do you want me to split up the patch? > Yes. At least you should have proposed a minimum patch that explains why the old code was broken and how you fixed it. Style adjustments can follow provided they have clearly no impact on behavior of existent code. > I ref

Re: [Mingw-w64-public] [PATCH] Fix potential deadlock in pthread condition variable

2019-04-08 Thread Andrew Ng
Do you want me to split up the patch? I reformatted the code to a consistent layout to improve readability whilst I was trying to figure out how it worked. The original code had a variety of styles. Is there a "preferred" style? I noticed that other source have different styles. Does the removal

Re: [Mingw-w64-public] [PATCH] Fix potential deadlock in pthread condition variable

2019-04-08 Thread Liu Hao
在 2019/4/8 下午12:07, Andrew Ng 写道: > OK, no problem. Hopefully, the attachment with this message will make it > through! > This patch contains a number of whitespace changes and reordering of code that are otherwise unnecessary, which obfuscates your idea. Rearrangement of code should be send as a

Re: [Mingw-w64-public] [PATCH] Fix potential deadlock in pthread condition variable

2019-04-07 Thread Martin Storsjö
On Sun, 7 Apr 2019, Andrew Ng wrote: Hi, I have taken a look at issue https://sourceforge.net/p/mingw-w64/bugs/597, which I recently ran into again (had hoped it would have been fixed by now). I have attached a patch with a proposed fix to the MinGW-w64 winpthreads. I have been running this pa

Re: [Mingw-w64-public] [PATCH] Fix potential deadlock in pthread condition variable

2019-04-07 Thread Liu Hao
在 2019/4/7 下午12:27, Andrew Ng 写道: > Hi, > > I have taken a look at issue https://sourceforge.net/p/mingw-w64/bugs/597, > which I recently ran into again (had hoped it would have been fixed by now). > > I have attached a patch with a proposed fix to the MinGW-w64 winpthreads. I > have been running

[Mingw-w64-public] [PATCH] Fix potential deadlock in pthread condition variable

2019-04-07 Thread Andrew Ng
Hi, I have taken a look at issue https://sourceforge.net/p/mingw-w64/bugs/597, which I recently ran into again (had hoped it would have been fixed by now). I have attached a patch with a proposed fix to the MinGW-w64 winpthreads. I have been running this patch for a little while now and it appear