| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010, Google Inc. All rights reserved. | 2 * Copyright (C) 2010, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 void clearHandlersToBeDeleted(); | 95 void clearHandlersToBeDeleted(); |
| 96 | 96 |
| 97 // | 97 // |
| 98 // Thread Safety and Graph Locking: | 98 // Thread Safety and Graph Locking: |
| 99 // | 99 // |
| 100 void setAudioThread(ThreadIdentifier thread) { m_audioThread = thread; } //
FIXME: check either not initialized or the same | 100 void setAudioThread(ThreadIdentifier thread) { m_audioThread = thread; } //
FIXME: check either not initialized or the same |
| 101 ThreadIdentifier audioThread() const { return m_audioThread; } | 101 ThreadIdentifier audioThread() const { return m_audioThread; } |
| 102 bool isAudioThread() const; | 102 bool isAudioThread() const; |
| 103 | 103 |
| 104 void lock(); | 104 void lock(); |
| 105 void forceLock(); |
| 105 bool tryLock(); | 106 bool tryLock(); |
| 106 void unlock(); | 107 void unlock(); |
| 107 #if ENABLE(ASSERT) | 108 #if ENABLE(ASSERT) |
| 108 // Returns true if this thread owns the context's lock. | 109 // Returns true if this thread owns the context's lock. |
| 109 bool isGraphOwner(); | 110 bool isGraphOwner(); |
| 110 #endif | 111 #endif |
| 111 | 112 |
| 112 class MODULES_EXPORT AutoLocker { | 113 class MODULES_EXPORT AutoLocker { |
| 113 STACK_ALLOCATED(); | 114 STACK_ALLOCATED(); |
| 114 public: | 115 public: |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 Vector<RefPtr<AudioHandler>> m_deletableOrphanHandlers; | 160 Vector<RefPtr<AudioHandler>> m_deletableOrphanHandlers; |
| 160 | 161 |
| 161 // Graph locking. | 162 // Graph locking. |
| 162 RecursiveMutex m_contextGraphMutex; | 163 RecursiveMutex m_contextGraphMutex; |
| 163 volatile ThreadIdentifier m_audioThread; | 164 volatile ThreadIdentifier m_audioThread; |
| 164 }; | 165 }; |
| 165 | 166 |
| 166 } // namespace blink | 167 } // namespace blink |
| 167 | 168 |
| 168 #endif // DeferredTaskHandler_h | 169 #endif // DeferredTaskHandler_h |
| OLD | NEW |