QMutex: remove qmutex_win.cpp
It hasn't been used since 91f6460aff
, a
commit that added support for futexes on Windows. It defines
QT_ALWAYS_USE_FUTEX.
Pick-to: 6.4
Change-Id: Ieba79baf5ac34264a988fffd172612892bd670d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
cf17206a9d
commit
b6e30e9fee
@ -537,7 +537,6 @@ qt_internal_extend_target(Core CONDITION QT_FEATURE_animation
|
|||||||
# from the wrong DLL at runtime and crash!
|
# from the wrong DLL at runtime and crash!
|
||||||
qt_internal_extend_target(Core CONDITION QT_FEATURE_thread AND WIN32
|
qt_internal_extend_target(Core CONDITION QT_FEATURE_thread AND WIN32
|
||||||
SOURCES
|
SOURCES
|
||||||
thread/qmutex_win.cpp
|
|
||||||
thread/qwaitcondition_win.cpp
|
thread/qwaitcondition_win.cpp
|
||||||
LIBRARIES
|
LIBRARIES
|
||||||
synchronization
|
synchronization
|
||||||
@ -1407,7 +1406,6 @@ qt_internal_extend_target(Core CONDITION WASM
|
|||||||
set_source_files_properties(
|
set_source_files_properties(
|
||||||
thread/qmutex_mac.cpp
|
thread/qmutex_mac.cpp
|
||||||
thread/qmutex_unix.cpp
|
thread/qmutex_unix.cpp
|
||||||
thread/qmutex_win.cpp
|
|
||||||
PROPERTIES HEADER_FILE_ONLY ON) # special case: These files are included by qmutex.cpp!
|
PROPERTIES HEADER_FILE_ONLY ON) # special case: These files are included by qmutex.cpp!
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,10 +8,9 @@
|
|||||||
// W A R N I N G
|
// W A R N I N G
|
||||||
// -------------
|
// -------------
|
||||||
//
|
//
|
||||||
// This file is not part of the Qt API. It exists for the convenience
|
// This file is not part of the Qt API. It exists for the convenience of
|
||||||
// of qmutex.cpp, qmutex_unix.cpp, and qmutex_win.cpp. This header
|
// qmutex.cpp and qmutex_unix.cpp. This header file may change from version to
|
||||||
// file may change from version to version without notice, or even be
|
// version without notice, or even be removed.
|
||||||
// removed.
|
|
||||||
//
|
//
|
||||||
// We mean it.
|
// We mean it.
|
||||||
//
|
//
|
||||||
|
@ -865,12 +865,10 @@ void QMutexPrivate::derefWaiters(int value) noexcept
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#if defined(Q_OS_LINUX) && defined(QT_ALWAYS_USE_FUTEX)
|
#if defined(QT_ALWAYS_USE_FUTEX)
|
||||||
// nothing
|
// nothing
|
||||||
#elif defined(Q_OS_MAC)
|
#elif defined(Q_OS_MAC)
|
||||||
# include "qmutex_mac.cpp"
|
# include "qmutex_mac.cpp"
|
||||||
#elif defined(Q_OS_WIN)
|
|
||||||
# include "qmutex_win.cpp"
|
|
||||||
#else
|
#else
|
||||||
# include "qmutex_unix.cpp"
|
# include "qmutex_unix.cpp"
|
||||||
#endif
|
#endif
|
||||||
|
@ -10,10 +10,9 @@
|
|||||||
// W A R N I N G
|
// W A R N I N G
|
||||||
// -------------
|
// -------------
|
||||||
//
|
//
|
||||||
// This file is not part of the Qt API. It exists for the convenience
|
// This file is not part of the Qt API. It exists for the convenience of
|
||||||
// of qmutex.cpp, qmutex_unix.cpp, and qmutex_win.cpp. This header
|
// qmutex.cpp and qmutex_unix.cpp. This header file may change from version to
|
||||||
// file may change from version to version without notice, or even be
|
// version without notice, or even be removed.
|
||||||
// removed.
|
|
||||||
//
|
//
|
||||||
// We mean it.
|
// We mean it.
|
||||||
//
|
//
|
||||||
@ -90,8 +89,6 @@ public:
|
|||||||
bool wakeup;
|
bool wakeup;
|
||||||
pthread_mutex_t mutex;
|
pthread_mutex_t mutex;
|
||||||
pthread_cond_t cond;
|
pthread_cond_t cond;
|
||||||
#elif defined(Q_OS_WIN)
|
|
||||||
Qt::HANDLE event;
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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
|
|
@ -7,10 +7,9 @@
|
|||||||
// W A R N I N G
|
// W A R N I N G
|
||||||
// -------------
|
// -------------
|
||||||
//
|
//
|
||||||
// This file is not part of the Qt API. It exists for the convenience
|
// This file is not part of the Qt API. It exists for the convenience of
|
||||||
// of qmutex.cpp, qmutex_unix.cpp, and qmutex_win.cpp. This header
|
// qmutex.cpp and qmutex_unix.cpp. This header file may change from version to
|
||||||
// file may change from version to version without notice, or even be
|
// version without notice, or even be removed.
|
||||||
// removed.
|
|
||||||
//
|
//
|
||||||
// We mean it.
|
// We mean it.
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user