[vlc-devel] zvbi on win64

Rémi Denis-Courmont remi at remlab.net
Sat Jan 19 19:34:42 CET 2013


Le samedi 19 janvier 2013 20:06:56, Mario Speiß a écrit :
> int
> pthread_once (pthread_once_t * once_control, void (*init_routine) (void))
> {
> +#ifdef WIN64
> +  if (ptw32_interlocked_compare_exchange == NULL)
> +    {
> +      ptw32_interlocked_compare_exchange =
> ptw32_InterlockedCompareExchange;
> +    }
> +#endif

Not sure about Windows, but this does not follow the POSIX memory coherency 
model. You'd better set the pointer statically. In fact, I don't understand 
why this needs a function pointer at all, especially not on 64-bits.

>    if (once_control == NULL || init_routine == NULL)
>      {
>        return EINVAL;
>      }
> .............
> 
> Someone could make a patch from this to add it to
> contrib/src/pthreads/pthreads-win64.patch
> as i dont know how to do that.

There is already a patch in the pthreads contrib package. You can use that as 
an example. It's just a regular unified diff.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list