version 1.7, 2005/12/09 18:35:49
|
version 1.8, 2005/12/09 18:51:25
|
|
|
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
#if defined(PEGASUS_OS_SOLARIS) |
|
# include <sys/types.h> |
|
# include <unistd.h> |
|
#endif |
|
|
#include "SpinLock.h" | #include "SpinLock.h" |
| |
#if !defined(PEGASUS_OS_VMS) && !defined(PEGASUS_OS_TYPE_WINDOWS) | #if !defined(PEGASUS_OS_VMS) && !defined(PEGASUS_OS_TYPE_WINDOWS) |
|
|
// child process from waiting indefinitely on a mutex that was locked by | // child process from waiting indefinitely on a mutex that was locked by |
// another thread in the parent process during the fork. | // another thread in the parent process during the fork. |
| |
void _lockSpinLockPool() |
extern "C" void _lockSpinLockPool() |
{ | { |
// Initialize the spinlock pool if not already done. | // Initialize the spinlock pool if not already done. |
| |
|
|
// This function is called after forking. It unlocks the mutexes that | // This function is called after forking. It unlocks the mutexes that |
// were locked by _lockSpinLockPool() before the fork. | // were locked by _lockSpinLockPool() before the fork. |
| |
void _unlockSpinLockPool() |
extern "C" void _unlockSpinLockPool() |
{ | { |
pthread_mutex_unlock(&_spinLockInitMutex); | pthread_mutex_unlock(&_spinLockInitMutex); |
| |