[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
win32 ost::Mutex class ideology missing
From: |
Andrey Kulikov |
Subject: |
win32 ost::Mutex class ideology missing |
Date: |
Thu, 24 Jun 2004 15:20:13 +0400 |
Good day!
Now class Mutex under win32 used Windows kernel object Mutex.
Normally, in the win32, kernel object Mutex used for interprocess
communication.
If required synchronization just in single process, normaly used
CriticalSection.
Using a win32 Mutex for synchronization in single process produces a VERY
big overhead.
Moreover, class Mutex not provided abbility to use it for IPC
synchronization (imposible to specify a name of the mutex object).
Under unix it used pthread_mutex_* functions, which not support IPC.
I send patch to ost::Mutex class (from version 1.2.1) and suddest introduce
to commonCPP a new class "ICPMutex" scecially for IPC synchronization.
Offered version of Mutex class under win32 used CriticalSection.
For compiling under win32 to w32 config.h must be added define
#define _WIN32_WINNT 0x0403
or
#define _WIN32_WINNT 0x0400
(Patch also provided)
--
Best regards,
Andrey mailto:address@hidden
thread.h.patch
Description: Binary data
config.h.patch
Description: Binary data
mutex.cpp.patch
Description: Binary data
- win32 ost::Mutex class ideology missing,
Andrey Kulikov <=