ap at webkit.org
Thu Jul 31 01:08:47 PDT 2008
On Jul 31, 2008, at 10:38 AM, eric at webkit.org wrote:
> Try to clean up our usage of USE(MULTIPLE_THREADS) vs.
> USE(PTHREADS) a little.
There is indeed some confusion between MULTIPLE_THREADS and PTHREADS
in JSC now. One of the reasons is that some of the threading code can
be used in WebCore even if JSC is not threaded, and vice versa. The
former macro enables JSC multithreading, while the latter in not as
> It looks like JSC assumes that if MULTIPLE_THREADS is
> defined, then pthreads will always be available
> I'm not sure that's always the case for gtk, certainly not
> for Windows. We should eventually go back
> and fix wtf/Threading.h to cover all these cases some day.
Yes, JSC currently assumes that pthreads is available for
MULTIPLE_THREADS. It is not at all obvious to me that this is a wrong
assumption - we'd need a compatibility layer for platforms that don't
have native pthreads anyway, so why not use existing pthreads
implementations for these platforms? We do that on Windows, for example.
Let's discuss this before declaring it wrong at least.
> (rev 35473)
> (rev 35474)
> @@ -28,9 +28,6 @@
> #include <wtf/Noncopyable.h>
> #include <wtf/OwnPtr.h>
> #include <wtf/Threading.h>
> -#if USE(MULTIPLE_THREADS)
> -#include <pthread.h>
This change in particular seems wrong to me - the file uses
pthread_key_t under #if USE(MULTIPLE_THREADS), but pthread.h is only
included in Threading.h under #if USE(PTHREADS).
- WBR, Alexey Proskuryakov
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev