| 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 #include <stdint.h> | 33 #include <stdint.h> |
| 34 | 34 |
| 35 #include "wtf/WTFExport.h" | 35 #include "wtf/WTFExport.h" |
| 36 | 36 |
| 37 namespace WTF { | 37 namespace WTF { |
| 38 | 38 |
| 39 typedef uint32_t ThreadIdentifier; | 39 typedef uint32_t ThreadIdentifier; |
| 40 typedef void MainThreadFunction(void*); | 40 typedef void MainThreadFunction(void*); |
| 41 | 41 |
| 42 // Must be called from the main thread. | 42 WTF_EXPORT void initializeMainThread(); |
| 43 WTF_EXPORT void initializeMainThread(void (*)(MainThreadFunction, void*)); | |
| 44 | |
| 45 WTF_EXPORT void callOnMainThread(MainThreadFunction*, void* context); | |
| 46 | 43 |
| 47 WTF_EXPORT bool isMainThread(); | 44 WTF_EXPORT bool isMainThread(); |
| 48 | 45 |
| 49 } // namespace WTF | 46 } // namespace WTF |
| 50 | 47 |
| 51 using WTF::callOnMainThread; | |
| 52 using WTF::isMainThread; | 48 using WTF::isMainThread; |
| 53 #endif // MainThread_h | 49 #endif // MainThread_h |
| OLD | NEW |