OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) | 3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 T& name = *static_cast<T*>(name##Pointer) | 55 T& name = *static_cast<T*>(name##Pointer) |
56 | 56 |
57 namespace WTF { | 57 namespace WTF { |
58 | 58 |
59 #if OS(WIN) | 59 #if OS(WIN) |
60 typedef uint32_t ThreadIdentifier; | 60 typedef uint32_t ThreadIdentifier; |
61 #else | 61 #else |
62 typedef intptr_t ThreadIdentifier; | 62 typedef intptr_t ThreadIdentifier; |
63 #endif | 63 #endif |
64 | 64 |
| 65 namespace internal { |
| 66 ThreadIdentifier currentThreadSyscall(); |
| 67 } // namespace internal |
| 68 |
65 WTF_EXPORT ThreadIdentifier currentThread(); | 69 WTF_EXPORT ThreadIdentifier currentThread(); |
66 | 70 |
67 WTF_EXPORT void lockAtomicallyInitializedStaticMutex(); | 71 WTF_EXPORT void lockAtomicallyInitializedStaticMutex(); |
68 WTF_EXPORT void unlockAtomicallyInitializedStaticMutex(); | 72 WTF_EXPORT void unlockAtomicallyInitializedStaticMutex(); |
69 | 73 |
70 #if DCHECK_IS_ON() | 74 #if DCHECK_IS_ON() |
71 WTF_EXPORT bool isAtomicallyInitializedStaticMutexLockHeld(); | 75 WTF_EXPORT bool isAtomicallyInitializedStaticMutexLockHeld(); |
72 WTF_EXPORT bool isBeforeThreadCreated(); | 76 WTF_EXPORT bool isBeforeThreadCreated(); |
73 WTF_EXPORT void willCreateThread(); | 77 WTF_EXPORT void willCreateThread(); |
74 #endif | 78 #endif |
75 | 79 |
76 } // namespace WTF | 80 } // namespace WTF |
77 | 81 |
78 using WTF::ThreadIdentifier; | 82 using WTF::ThreadIdentifier; |
79 using WTF::currentThread; | 83 using WTF::currentThread; |
80 | 84 |
81 #endif // Threading_h | 85 #endif // Threading_h |
OLD | NEW |