diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/corelib/thread/qlocking_p.h | 7 | ||||
-rw-r--r-- | src/corelib/thread/qmutex.cpp | 4 | ||||
-rw-r--r-- | src/corelib/thread/qmutex_p.h | 9 | ||||
-rw-r--r-- | src/corelib/thread/qmutex_win.cpp | 30 | ||||
-rw-r--r-- | src/corelib/thread/qwaitcondition_p.h | 7 |
6 files changed, 10 insertions, 49 deletions
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index 5d9c7a9828..47e6071cec 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -537,7 +537,6 @@ qt_internal_extend_target(Core CONDITION QT_FEATURE_animation # from the wrong DLL at runtime and crash! qt_internal_extend_target(Core CONDITION QT_FEATURE_thread AND WIN32 SOURCES - thread/qmutex_win.cpp thread/qwaitcondition_win.cpp LIBRARIES synchronization @@ -1407,7 +1406,6 @@ qt_internal_extend_target(Core CONDITION WASM set_source_files_properties( thread/qmutex_mac.cpp thread/qmutex_unix.cpp - thread/qmutex_win.cpp PROPERTIES HEADER_FILE_ONLY ON) # special case: These files are included by qmutex.cpp! diff --git a/src/corelib/thread/qlocking_p.h b/src/corelib/thread/qlocking_p.h index 0c205fff66..9fa7e70da9 100644 --- a/src/corelib/thread/qlocking_p.h +++ b/src/corelib/thread/qlocking_p.h @@ -8,10 +8,9 @@ // W A R N I N G // ------------- // -// This file is not part of the Qt API. It exists for the convenience -// of qmutex.cpp, qmutex_unix.cpp, and qmutex_win.cpp. This header -// file may change from version to version without notice, or even be -// removed. +// This file is not part of the Qt API. It exists for the convenience of +// qmutex.cpp and qmutex_unix.cpp. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp index fb15606ec0..7b4aac9532 100644 --- a/src/corelib/thread/qmutex.cpp +++ b/src/corelib/thread/qmutex.cpp @@ -865,12 +865,10 @@ void QMutexPrivate::derefWaiters(int value) noexcept QT_END_NAMESPACE -#if defined(Q_OS_LINUX) && defined(QT_ALWAYS_USE_FUTEX) +#if defined(QT_ALWAYS_USE_FUTEX) // nothing #elif defined(Q_OS_MAC) # include "qmutex_mac.cpp" -#elif defined(Q_OS_WIN) -# include "qmutex_win.cpp" #else # include "qmutex_unix.cpp" #endif diff --git a/src/corelib/thread/qmutex_p.h b/src/corelib/thread/qmutex_p.h index 9985a068c5..e5932d0a66 100644 --- a/src/corelib/thread/qmutex_p.h +++ b/src/corelib/thread/qmutex_p.h @@ -10,10 +10,9 @@ // W A R N I N G // ------------- // -// This file is not part of the Qt API. It exists for the convenience -// of qmutex.cpp, qmutex_unix.cpp, and qmutex_win.cpp. This header -// file may change from version to version without notice, or even be -// removed. +// This file is not part of the Qt API. It exists for the convenience of +// qmutex.cpp and qmutex_unix.cpp. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // @@ -90,8 +89,6 @@ public: bool wakeup; pthread_mutex_t mutex; pthread_cond_t cond; -#elif defined(Q_OS_WIN) - Qt::HANDLE event; #endif }; diff --git a/src/corelib/thread/qmutex_win.cpp b/src/corelib/thread/qmutex_win.cpp deleted file mode 100644 index 8c7741c113..0000000000 --- a/src/corelib/thread/qmutex_win.cpp +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only - -#include "qmutex.h" -#include <qatomic.h> -#include "qmutex_p.h" -#include <qt_windows.h> - -QT_BEGIN_NAMESPACE - -QMutexPrivate::QMutexPrivate() -{ - event = CreateEvent(0, FALSE, FALSE, 0); - - if (!event) - qWarning("QMutexPrivate::QMutexPrivate: Cannot create event"); -} - -QMutexPrivate::~QMutexPrivate() -{ CloseHandle(event); } - -bool QMutexPrivate::wait(int timeout) -{ - return (WaitForSingleObjectEx(event, timeout < 0 ? INFINITE : timeout, FALSE) == WAIT_OBJECT_0); -} - -void QMutexPrivate::wakeUp() noexcept -{ SetEvent(event); } - -QT_END_NAMESPACE diff --git a/src/corelib/thread/qwaitcondition_p.h b/src/corelib/thread/qwaitcondition_p.h index e82f832817..0893e9dd35 100644 --- a/src/corelib/thread/qwaitcondition_p.h +++ b/src/corelib/thread/qwaitcondition_p.h @@ -7,10 +7,9 @@ // W A R N I N G // ------------- // -// This file is not part of the Qt API. It exists for the convenience -// of qmutex.cpp, qmutex_unix.cpp, and qmutex_win.cpp. This header -// file may change from version to version without notice, or even be -// removed. +// This file is not part of the Qt API. It exists for the convenience of +// qmutex.cpp and qmutex_unix.cpp. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // |