I still unclear of 64-bit support of current pthread inmlementation on Windows.
I use Visual Studio 2008 to produce native 64-bit executable.
I got pthread sources from top of cvs repository and build the
library. I read somewhere that static lib is not good for some
reasons, so I build DLL. But I have problem with
pthread_cond_destroy(), program crashes on that call.
pthread_cond_destroy() calls pthread_mutex_trylock(), which tries to
call by zero pointer. ptw32_interlocked_compare_exchange should point
to actual function but it is NULL pointer.
Any thoughts? Did I miss some important build steps, like special
defines or something, or maybe there are patches to current CVS trunk?
* We do a quick check to see if we need to do more work
* to initialise a static mutex. We check
* again inside the guarded section of ptw32_mutex_check_need_init()
* to avoid race conditions.
if (*mutex >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER)
0000000180006432 mov rax,qword ptr [mutex]
000000018000643A cmp qword ptr [rax],0FFFFFFFFFFFFFFFDh
000000018000643E jb pthread_mutex_trylock+61h (180006461h)
if ((result = ptw32_mutex_check_need_init (mutex)) != 0)
0000000180006440 mov rcx,qword ptr [mutex]
0000000180006448 call @ILT+440(ptw32_mutex_check_need_init)
000000018000644D mov dword ptr [result],eax
0000000180006451 cmp dword ptr [result],0
0000000180006456 je pthread_mutex_trylock+61h (180006461h)
0000000180006458 mov eax,dword ptr [result]
000000018000645C jmp pthread_mutex_trylock+13Ch (18000653Ch)