version 1.11.12.2, 2009/02/03 11:07:22
|
version 1.12, 2008/08/14 17:44:27
|
|
|
| |
void try_lock(); | void try_lock(); |
| |
void timed_lock(Uint32 milliseconds); |
/** |
|
Attempts to lock the mutex within the specified time. |
|
@param milliseconds The maximum time to block while attempting to |
|
acquire the lock. |
|
@return A Boolean indicating whether the lock was acquired. |
|
*/ |
|
Boolean timed_lock(Uint32 milliseconds); |
| |
void unlock(); | void unlock(); |
| |
#if defined(PEGASUS_OS_LINUX) |
#if defined(PEGASUS_OS_LINUX) || \ |
|
(defined(PEGASUS_OS_ZOS) && !(__TARGET_LIB__ < 0x41090000)) |
/** | /** |
This method must only be called after a fork() to reset the mutex | This method must only be called after a fork() to reset the mutex |
lock status in the new process. Any other use of this method is | lock status in the new process. Any other use of this method is |
|
|
// Use of this macro ensures that a static Mutex is not locked across a fork(). | // Use of this macro ensures that a static Mutex is not locked across a fork(). |
| |
#if !defined(PEGASUS_HAVE_PTHREADS) || \ | #if !defined(PEGASUS_HAVE_PTHREADS) || \ |
defined(PEGASUS_OS_ZOS) || \ |
(defined(PEGASUS_OS_ZOS) && (__TARGET_LIB__ < 0x41090000)) || \ |
defined(PEGASUS_OS_VMS) | defined(PEGASUS_OS_VMS) |
| |
# define PEGASUS_FORK_SAFE_MUTEX(mutex) | # define PEGASUS_FORK_SAFE_MUTEX(mutex) |
| |
#elif defined(PEGASUS_OS_LINUX) |
#elif defined(PEGASUS_OS_LINUX) || \ |
|
(defined(PEGASUS_OS_ZOS) && !(__TARGET_LIB__ < 0x41090000)) |
| |
# define PEGASUS_FORK_SAFE_MUTEX(mutex) \ | # define PEGASUS_FORK_SAFE_MUTEX(mutex) \ |
class ForkSafeMutex ## mutex \ | class ForkSafeMutex ## mutex \ |