Changeset 182848 in webkit


Ignore:
Timestamp:
Apr 15, 2015 11:22:43 AM (9 years ago)
Author:
commit-queue@webkit.org
Message:

Harmonize binary semaphore ifdefs

They should be either OS(WINDOWS) (in which case we'd need
BinarySemaphoreWin.cpp, which is not shipped by WebKitGTK)
or PLATFORM(WIN) (in which case Mutex/ThreadCondition-based
implementation is used).

This fixes errors like:

CXX Source/WTF/wtf/threads/libWTF_la-BinarySemaphore.lo

../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp: In constructor 'WTF::BinarySemaphore::BinarySemaphore()':
../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:34:7: error: class 'WTF::BinarySemaphore' does not have any field named 'm_isSet'

: m_isSet(false)


../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp: In member function 'void WTF::BinarySemaphore::signal()':
../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:44:24: error: 'm_mutex' was not declared in this scope

MutexLocker locker(m_mutex);


../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:46:5: error: 'm_isSet' was not declared in this scope

m_isSet = true;

../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:47:5: error: 'm_condition' was not declared in this scope

m_condition.signal();

../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp: In member function 'bool WTF::BinarySemaphore::wait(double)':
../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:52:24: error: 'm_mutex' was not declared in this scope

MutexLocker locker(m_mutex);


../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:55:13: error: 'm_isSet' was not declared in this scope

while (!m_isSet) {


../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:56:21: error: 'm_condition' was not declared in this scope

timedOut = !m_condition.timedWait(m_mutex, absoluteTime);


../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:62:5: error: 'm_isSet' was not declared in this scope

m_isSet = false;

GNUmakefile:52762: recipe for target 'Source/WTF/wtf/threads/libWTF_la-BinarySemaphore.lo' failed

[W32] Inconsistent ifdefs in BinarySemaphore.h and BinarySemaphore.cpp
https://bugs.webkit.org/show_bug.cgi?id=143756

Patch by Руслан Ижбулатов <lrn1986@gmail.com> on 2015-04-15
Reviewed by Darin Adler.

  • wtf/threads/BinarySemaphore.h:
Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r182676 r182848  
     12015-04-15  Руслан Ижбулатов  <lrn1986@gmail.com>
     2
     3        Harmonize binary semaphore ifdefs
     4
     5        They should be either OS(WINDOWS) (in which case we'd need
     6        BinarySemaphoreWin.cpp, which is not shipped by WebKitGTK)
     7        or PLATFORM(WIN) (in which case Mutex/ThreadCondition-based
     8        implementation is used).
     9
     10        This fixes errors like:
     11          CXX      Source/WTF/wtf/threads/libWTF_la-BinarySemaphore.lo
     12        ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp: In constructor 'WTF::BinarySemaphore::BinarySemaphore()':
     13        ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:34:7: error: class 'WTF::BinarySemaphore' does not have any field named 'm_isSet'
     14             : m_isSet(false)
     15               ^
     16        ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp: In member function 'void WTF::BinarySemaphore::signal()':
     17        ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:44:24: error: 'm_mutex' was not declared in this scope
     18             MutexLocker locker(m_mutex);
     19                                ^
     20        ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:46:5: error: 'm_isSet' was not declared in this scope
     21             m_isSet = true;
     22             ^
     23        ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:47:5: error: 'm_condition' was not declared in this scope
     24             m_condition.signal();
     25             ^
     26        ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp: In member function 'bool WTF::BinarySemaphore::wait(double)':
     27        ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:52:24: error: 'm_mutex' was not declared in this scope
     28             MutexLocker locker(m_mutex);
     29                                ^
     30        ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:55:13: error: 'm_isSet' was not declared in this scope
     31             while (!m_isSet) {
     32                     ^
     33        ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:56:21: error: 'm_condition' was not declared in this scope
     34                 timedOut = !m_condition.timedWait(m_mutex, absoluteTime);
     35                             ^
     36        ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:62:5: error: 'm_isSet' was not declared in this scope
     37             m_isSet = false;
     38             ^
     39        GNUmakefile:52762: recipe for target 'Source/WTF/wtf/threads/libWTF_la-BinarySemaphore.lo' failed
     40
     41        [W32] Inconsistent ifdefs in BinarySemaphore.h and BinarySemaphore.cpp
     42        https://bugs.webkit.org/show_bug.cgi?id=143756
     43
     44        Reviewed by Darin Adler.
     45
     46        * wtf/threads/BinarySemaphore.h:
     47
    1482015-04-12  Michael Catanzaro  <mcatanzaro@igalia.com>
    249
  • trunk/Source/WTF/wtf/threads/BinarySemaphore.h

    r161173 r182848  
    4242    WTF_EXPORT_PRIVATE bool wait(double absoluteTime);
    4343
    44 #if OS(WINDOWS)
     44#if PLATFORM(WIN)
    4545    HANDLE event() const { return m_event; }
    4646#endif
    4747
    4848private:
    49 #if OS(WINDOWS)
     49#if PLATFORM(WIN)
    5050    HANDLE m_event;
    5151#else
Note: See TracChangeset for help on using the changeset viewer.