| 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 29 matching lines...) Expand all Loading... |
| 40 #if OS(WIN) | 40 #if OS(WIN) |
| 41 typedef uint32_t ThreadIdentifier; | 41 typedef uint32_t ThreadIdentifier; |
| 42 #else | 42 #else |
| 43 typedef intptr_t ThreadIdentifier; | 43 typedef intptr_t ThreadIdentifier; |
| 44 #endif | 44 #endif |
| 45 | 45 |
| 46 namespace internal { | 46 namespace internal { |
| 47 WTF_EXPORT ThreadIdentifier currentThreadSyscall(); | 47 WTF_EXPORT ThreadIdentifier currentThreadSyscall(); |
| 48 } // namespace internal | 48 } // namespace internal |
| 49 | 49 |
| 50 // Initializes global state required by |currentThread|. |
| 51 // Needs to be called once during program execution, before |currentThread|. |
| 52 WTF_EXPORT void initializeCurrentThread(); |
| 53 |
| 50 WTF_EXPORT ThreadIdentifier currentThread(); | 54 WTF_EXPORT ThreadIdentifier currentThread(); |
| 51 | 55 |
| 52 #if DCHECK_IS_ON() | 56 #if DCHECK_IS_ON() |
| 53 WTF_EXPORT bool isBeforeThreadCreated(); | 57 WTF_EXPORT bool isBeforeThreadCreated(); |
| 54 WTF_EXPORT void willCreateThread(); | 58 WTF_EXPORT void willCreateThread(); |
| 55 #endif | 59 #endif |
| 56 | 60 |
| 57 } // namespace WTF | 61 } // namespace WTF |
| 58 | 62 |
| 59 using WTF::ThreadIdentifier; | 63 using WTF::ThreadIdentifier; |
| 60 using WTF::currentThread; | 64 using WTF::currentThread; |
| 61 | 65 |
| 62 #endif // Threading_h | 66 #endif // Threading_h |
| OLD | NEW |