Chromium Code Reviews| 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 // Must be called before |currentThread|. | |
|
haraken
2017/03/06 01:44:03
Can we add a dcheck about this fact?
BTW, who cal
jbroman
2017/03/06 16:14:03
Sure.
| |
| 51 WTF_EXPORT void initializeCurrentThread(); | |
| 52 | |
| 50 WTF_EXPORT ThreadIdentifier currentThread(); | 53 WTF_EXPORT ThreadIdentifier currentThread(); |
| 51 | 54 |
| 52 #if DCHECK_IS_ON() | 55 #if DCHECK_IS_ON() |
| 53 WTF_EXPORT bool isBeforeThreadCreated(); | 56 WTF_EXPORT bool isBeforeThreadCreated(); |
| 54 WTF_EXPORT void willCreateThread(); | 57 WTF_EXPORT void willCreateThread(); |
| 55 #endif | 58 #endif |
| 56 | 59 |
| 57 } // namespace WTF | 60 } // namespace WTF |
| 58 | 61 |
| 59 using WTF::ThreadIdentifier; | 62 using WTF::ThreadIdentifier; |
| 60 using WTF::currentThread; | 63 using WTF::currentThread; |
| 61 | 64 |
| 62 #endif // Threading_h | 65 #endif // Threading_h |
| OLD | NEW |