[Webkit-unassigned] [Bug 39893] Explicitly use PTHREAD_MUTEX_NORMAL to create pthread mutex

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat May 29 17:23:30 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=39893





--- Comment #10 from Yong Li <yong.li.webkit at gmail.com>  2010-05-29 17:23:29 PST ---
(In reply to comment #9)
> Can we do this as a compile time check.
> 
> #if PTHREAD_MUTEX_DEFAULT == PTHREAD_MUTEX_NORMAL
> ...old code
> #else
> ...your code
> #endif

I thought about this, but it also assumes PTHREAD_MUTEX_NORMAL must be a constant. If PTHREAD_MUTEX_NORMAL is implemented by a function, this cannot build. Probably we can ignore this case?

> 
> I believe this is breaking the mac since the darwin implementation of pthread_t has a nested struct or array so you would have to initialize it with something like pt = {0, {0}}; I don't think depending on the implementations representation of pthread_t is a good idea though.

I can remove the initializer, because static variables are always zeroed.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list