| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 University of Szeged | 2 * Copyright (C) 2011 University of Szeged |
| 3 * Copyright (C) 2011 Gabor Loki <loki@webkit.org> | 3 * Copyright (C) 2011 Gabor Loki <loki@webkit.org> |
| 4 * All rights reserved. | 4 * All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #ifndef ParallelJobsGeneric_h | 28 #ifndef ParallelJobsGeneric_h |
| 29 #define ParallelJobsGeneric_h | 29 #define ParallelJobsGeneric_h |
| 30 | 30 |
| 31 #if ENABLE(THREADING_GENERIC) | 31 #if ENABLE(THREADING_GENERIC) |
| 32 | 32 |
| 33 #include <wtf/RefCounted.h> | 33 #include "wtf/RefCounted.h" |
| 34 #include <wtf/Threading.h> | 34 #include "wtf/Threading.h" |
| 35 #include "wtf/WTFExport.h" |
| 35 | 36 |
| 36 namespace WTF { | 37 namespace WTF { |
| 37 | 38 |
| 38 class ParallelEnvironment { | 39 class WTF_EXPORT ParallelEnvironment { |
| 39 WTF_MAKE_FAST_ALLOCATED; | 40 WTF_MAKE_FAST_ALLOCATED; |
| 40 public: | 41 public: |
| 41 typedef void (*ThreadFunction)(void*); | 42 typedef void (*ThreadFunction)(void*); |
| 42 | 43 |
| 43 ParallelEnvironment(ThreadFunction, size_t sizeOfParameter, int requestedJob
Number); | 44 ParallelEnvironment(ThreadFunction, size_t sizeOfParameter, int requestedJob
Number); |
| 44 | 45 |
| 45 int numberOfJobs() | 46 int numberOfJobs() |
| 46 { | 47 { |
| 47 return m_numberOfJobs; | 48 return m_numberOfJobs; |
| 48 } | 49 } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 Vector< RefPtr<ThreadPrivate> > m_threads; | 92 Vector< RefPtr<ThreadPrivate> > m_threads; |
| 92 static Vector< RefPtr<ThreadPrivate> >* s_threadPool; | 93 static Vector< RefPtr<ThreadPrivate> >* s_threadPool; |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 } // namespace WTF | 96 } // namespace WTF |
| 96 | 97 |
| 97 #endif // ENABLE(THREADING_GENERIC) | 98 #endif // ENABLE(THREADING_GENERIC) |
| 98 | 99 |
| 99 | 100 |
| 100 #endif // ParallelJobsGeneric_h | 101 #endif // ParallelJobsGeneric_h |
| OLD | NEW |