Cross-platform processor core counter fix
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jan 2012 18:10:30 +0000 (18:10 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jan 2012 18:10:30 +0000 (18:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=76540

Patch by Roland Takacs <takacs.roland@stud.u-szeged.hu> on 2012-01-18
Reviewed by Zoltan Herczeg.

I attached "OS(FREEBSD)" to "#if OS(DARWIN) || OS(OPENBSD) || OS(NETBSD)"
and I removed the OS checking macros from ParallelJobsGeneric.cpp because
the NumberOfCores.cpp contains them for counting CPU cores.
The processor core counter patch located at
https://bugs.webkit.org/show_bug.cgi?id=76530

* wtf/NumberOfCores.cpp:
* wtf/ParallelJobsGeneric.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105290 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/wtf/NumberOfCores.cpp
Source/JavaScriptCore/wtf/ParallelJobsGeneric.cpp

index 957de00..46c03dc 100644 (file)
@@ -1,3 +1,19 @@
+2012-01-18  Roland Takacs  <takacs.roland@stud.u-szeged.hu>
+
+        Cross-platform processor core counter fix
+        https://bugs.webkit.org/show_bug.cgi?id=76540
+
+        Reviewed by Zoltan Herczeg.
+
+        I attached "OS(FREEBSD)" to "#if OS(DARWIN) || OS(OPENBSD) || OS(NETBSD)"
+        and I removed the OS checking macros from ParallelJobsGeneric.cpp because
+        the NumberOfCores.cpp contains them for counting CPU cores.
+        The processor core counter patch located at
+        https://bugs.webkit.org/show_bug.cgi?id=76530
+
+        * wtf/NumberOfCores.cpp:
+        * wtf/ParallelJobsGeneric.cpp:
+
 2012-01-18  Csaba Osztrogonác  <ossy@webkit.org>
 
         Cross-platform processor core counter
index 43c88ab..1e7f45f 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "NumberOfCores.h"
 
-#if OS(DARWIN) || OS(OPENBSD) || OS(NETBSD)
+#if OS(DARWIN) || OS(OPENBSD) || OS(NETBSD) || OS(FREEBSD)
 #include <sys/sysctl.h>
 #include <sys/types.h>
 #elif OS(LINUX) || OS(AIX) || OS(SOLARIS)
index 06e799a..fd5b1f8 100644 (file)
 #if ENABLE(THREADING_GENERIC)
 
 #include "ParallelJobs.h"
-#include "UnusedParam.h"
 #include <wtf/NumberOfCores.h>
 
-#if OS(DARWIN) || OS(OPENBSD) || OS(NETBSD)
-#include <sys/sysctl.h>
-#include <sys/types.h>
-#elif OS(LINUX) || OS(AIX) || OS(SOLARIS)
-#include <unistd.h>
-#elif OS(WINDOWS)
-#include <windows.h>
-#endif
-
 namespace WTF {
 
 Vector< RefPtr<ParallelEnvironment::ThreadPrivate> >* ParallelEnvironment::s_threadPool = 0;