On 24/04/17 16:46, Emil Velikov wrote:
On 24 April 2017 at 12:56, Jose Fonseca wrote:
On 24/04/17 12:26, Emil Velikov wrote:
On 21 April 2017 at 16:45, Jose Fonseca wrote:
I reread http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf and is
not explicit.
But I checked C11 threads.h i
On 24 April 2017 at 12:56, Jose Fonseca wrote:
> On 24/04/17 12:26, Emil Velikov wrote:
>>
>> On 21 April 2017 at 16:45, Jose Fonseca wrote:
>>>
>>> I reread http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf and is
>>> not explicit.
>>>
>>> But I checked C11 threads.h implementation and t
On 24/04/17 12:26, Emil Velikov wrote:
On 21 April 2017 at 16:45, Jose Fonseca wrote:
I reread http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf and is
not explicit.
But I checked C11 threads.h implementation and thrd_current also uses
DuplicateHandle.
So C11/threads_win32.h is correc
On 21 April 2017 at 16:45, Jose Fonseca wrote:
> I reread http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf and is
> not explicit.
>
> But I checked C11 threads.h implementation and thrd_current also uses
> DuplicateHandle.
>
> So C11/threads_win32.h is correct. And ISO C11 standard commi
I reread http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf and
is not explicit.
But I checked C11 threads.h implementation and thrd_current also uses
DuplicateHandle.
So C11/threads_win32.h is correct. And ISO C11 standard commited
screwed up here. Maybe they'll introduce thread id
No, I'm afraid the problem is still there AFAICS.
GetCurrentThread returns a magic constant (-2 if I'm not mistaken). So
it is (and always will be) useless for thrd_current.
Imagine that:
- thread #1 invokes thrd_current() and gets -2
- thread #2 invokes thrd_current() and gets -2
- a thread
Series LGTM. Jose should probably take a look too, though.
One typo below?
Reviewed-by: Brian Paul
On 04/20/2017 08:15 AM, Emil Velikov wrote:
From: Emil Velikov
Earlier commit removed the implementation due to a subtle bug, in the
existing code. Namely:
One was comparing directly the thr
From: Emil Velikov
Earlier commit removed the implementation due to a subtle bug, in the
existing code. Namely:
One was comparing directly the thread handle/IDs rather than using
thrd_equal(). As the pseudo-handles never matched things went south.
That bug was resolved with commit 458c7490c29 "