12009-04-27 Dmitry Titov <dimich@chromium.org>
2
3 Reviewed by NOBODY (OOPS!).
4
5 https://bugs.webkit.org/show_bug.cgi?id=25348
6 Change WTF::ThreadIdentifier to be an actual (but wrapped) thread id, remove ThreadMap.
7
8 * JavaScriptCore.exp:
9 * wtf/Threading.h:
10 (WTF::ThreadIdentifier::ThreadIdentifier):
11 (WTF::ThreadIdentifier::isValid):
12 (WTF::ThreadIdentifier::invalidate):
13 (WTF::ThreadIdentifier::platformId):
14 ThreadIdentifier is now a class, containing a PlatformThreadIdentifier and
15 methods that are used across the code on thread ids: construction, comparisons,
16 check for 'valid' state etc. '0' is used as invalid id, which happens to just work
17 with all platform-specific thread id implementations.
18
19 All the following files reflect the new ThreadIdentifier for each platform.
20 We remove ThreadMap and threadMapMutex from all of them, remove the functions that
21 populated/searched/cleared the map and add platform-specific comparison operators
22 for ThreadIdentifier:
23
24 * wtf/ThreadingGtk.cpp:
25 (WTF::ThreadIdentifier::operator==):
26 (WTF::ThreadIdentifier::operator!=):
27 (WTF::initializeThreading):
28 (WTF::createThreadInternal):
29 (WTF::waitForThreadCompletion):
30 (WTF::currentThread):
31
32 * wtf/ThreadingNone.cpp:
33 (WTF::ThreadIdentifier::operator==):
34 (WTF::ThreadIdentifier::operator!=):
35
36 * wtf/ThreadingPthreads.cpp:
37 (WTF::ThreadIdentifier::operator==):
38 (WTF::ThreadIdentifier::operator!=):
39 (WTF::initializeThreading):
40 (WTF::createThreadInternal):
41 (WTF::waitForThreadCompletion):
42 (WTF::detachThread):
43 (WTF::currentThread):
44
45 * wtf/ThreadingQt.cpp:
46 (WTF::ThreadIdentifier::operator==):
47 (WTF::ThreadIdentifier::operator!=):
48 (WTF::initializeThreading):
49 (WTF::createThreadInternal):
50 (WTF::waitForThreadCompletion):
51 (WTF::currentThread):
52
53 * wtf/ThreadingWin.cpp:
54 (WTF::ThreadIdentifier::operator==):
55 (WTF::ThreadIdentifier::operator!=):
56 (WTF::initializeThreading):
57 (WTF::createThreadInternal):
58 (WTF::waitForThreadCompletion):
59 (WTF::detachThread):
60 (WTF::currentThread):
61