[webkit-dev] [webkit-changes] [35474] trunk/JavaScriptCore
Alexey Proskuryakov
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
clear cut.
>
> 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.
> Modified: trunk/JavaScriptCore/kjs/collector.h (35473 => 35474)
> --- trunk/JavaScriptCore/kjs/collector.h 2008-07-31 06:14:13 UTC
> (rev 35473)
> +++ trunk/JavaScriptCore/kjs/collector.h 2008-07-31 06:38:54 UTC
> (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>
> -#endif
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...
URL: http://lists.webkit.org/pipermail/webkit-dev/attachments/20080731/499390c5/attachment.html
More information about the webkit-dev
mailing list