mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-29 12:18:01 +01:00
* Complimentary to #3918 I think that we can use Poco::Mutex and Poco::FastMutex as wrappers for std::recursive_mutex and std::mutex instead of replacing For using std::*mutexes switch on cmake-option POCO_ENABLE_STD_MUTEX * add define POCO_ENABLE_STD_MUTEX to the Config.h remove empty if-else from CMakeLists.txt
66 lines
749 B
C++
66 lines
749 B
C++
//
|
|
// Mutex.cpp
|
|
//
|
|
// Library: Foundation
|
|
// Package: Threading
|
|
// Module: Mutex
|
|
//
|
|
// Copyright (c) 2004-2008, Applied Informatics Software Engineering GmbH.
|
|
// and Contributors.
|
|
//
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
//
|
|
|
|
|
|
#include "Poco/Mutex.h"
|
|
|
|
#if defined(POCO_ENABLE_STD_MUTEX)
|
|
#include "Mutex_STD.cpp"
|
|
#elif defined(POCO_OS_FAMILY_WINDOWS)
|
|
#if defined(_WIN32_WCE)
|
|
#include "Mutex_WINCE.cpp"
|
|
#else
|
|
#include "Mutex_WIN32.cpp"
|
|
#endif
|
|
#elif defined(POCO_VXWORKS)
|
|
#include "Mutex_VX.cpp"
|
|
#else
|
|
#include "Mutex_POSIX.cpp"
|
|
#endif
|
|
|
|
|
|
namespace Poco {
|
|
|
|
|
|
Mutex::Mutex()
|
|
{
|
|
}
|
|
|
|
|
|
Mutex::~Mutex()
|
|
{
|
|
}
|
|
|
|
|
|
FastMutex::FastMutex()
|
|
{
|
|
}
|
|
|
|
|
|
FastMutex::~FastMutex()
|
|
{
|
|
}
|
|
|
|
|
|
SpinlockMutex::SpinlockMutex()
|
|
{
|
|
}
|
|
|
|
|
|
SpinlockMutex::~SpinlockMutex()
|
|
{
|
|
}
|
|
|
|
|
|
} // namespace Poco
|