Ignore:
Timestamp:
Jan 22, 2009, 12:32:45 AM (16 years ago)
Author:
[email protected]
Message:

2009-01-22 Dmitry Titov <[email protected]>

Reviewed by Alexey Proskuryakov.

https://bugs.webkit.org/show_bug.cgi?id=23373

Implement ThreadCondition::timedWait().
Since we borrow the code for condition variables from other sources,
I did the same for timedWait(). See comments in ThreadingWin.cpp for
rationale and more info.

  • wtf/CONTRIBUTORS.pthreads-win32: Added. A list of Pthreads-win32 contributors mentioned in their license. The license itself is included into wtf/ThreadingWin32.cpp.
  • wtf/Threading.h:
  • wtf/ThreadingWin.cpp: Additional info and Pthreads-win32 license at the beginning. (WTF::PlatformCondition::timedWait): new method, derived from Pthreads-win32. (WTF::PlatformCondition::signal): same (WTF::ThreadCondition::ThreadCondition): (WTF::ThreadCondition::~ThreadCondition): (WTF::ThreadCondition::wait): this now calls PlatformCondition::timedWait. (WTF::ThreadCondition::timedWait): same (WTF::ThreadCondition::signal): this now calls PlatformCondition::signal. (WTF::ThreadCondition::broadcast): same
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/Threading.h

    r39908 r40122  
    133133};
    134134struct PlatformCondition {
    135     size_t m_timedOut;
    136     size_t m_blocked;
    137     size_t m_waitingForRemoval;
    138     HANDLE m_gate;
    139     HANDLE m_queue;
    140     HANDLE m_mutex;
     135    size_t m_waitersGone;
     136    size_t m_waitersBlocked;
     137    size_t m_waitersToUnblock;
     138    HANDLE m_blockLock;
     139    HANDLE m_blockQueue;
     140    HANDLE m_unblockLock;
     141
     142    bool timedWait(PlatformMutex&, DWORD durationMilliseconds);
     143    void signal(bool unblockAll);
    141144};
    142145#else
Note: See TracChangeset for help on using the changeset viewer.