mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 08:46:45 +08:00
- Add IPC_OS_FREEBSD_ platform detection macro - Enable FreeBSD to use POSIX pthread implementation (shared with QNX) - Update all conditional compilation directives to include FreeBSD - Update README to reflect FreeBSD platform support FreeBSD uses the existing POSIX implementation which supports: - Process-shared mutexes (PTHREAD_PROCESS_SHARED) - Robust mutexes (PTHREAD_MUTEX_ROBUST) - Timed lock operations - POSIX shared memory This is a minimal change that reuses the mature POSIX implementation already proven by QNX platform support.
23 lines
496 B
C++
23 lines
496 B
C++
#include "libipc/waiter.h"
|
|
|
|
#include "libipc/platform/detail.h"
|
|
#if defined(IPC_OS_WINDOWS_)
|
|
#include "libipc/platform/win/mutex.h"
|
|
#elif defined(IPC_OS_LINUX_)
|
|
#include "libipc/platform/linux/mutex.h"
|
|
#elif defined(IPC_OS_QNX_) || defined(IPC_OS_FREEBSD_)
|
|
#include "libipc/platform/posix/mutex.h"
|
|
#else/*IPC_OS*/
|
|
# error "Unsupported platform."
|
|
#endif
|
|
|
|
namespace ipc {
|
|
namespace detail {
|
|
|
|
void waiter::init() {
|
|
ipc::detail::sync::mutex::init();
|
|
}
|
|
|
|
} // namespace detail
|
|
} // namespace ipc
|