mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
protect against undefined symbol
This commit is contained in:
parent
edd9d59c0e
commit
23208e494c
@ -23,9 +23,8 @@ MutexPosixImpl() {
|
||||
TAU_PROFILE("MutexPosixImpl::MutexPosixImpl", " ", TAU_USER);
|
||||
pthread_mutexattr_t attr;
|
||||
pthread_mutexattr_init(&attr);
|
||||
#ifdef PTHREAD_MUTEX_DEFAULT
|
||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_DEFAULT);
|
||||
#endif
|
||||
// The symbol PTHREAD_MUTEX_DEFAULT isn't always available?
|
||||
// pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_DEFAULT);
|
||||
int result = pthread_mutex_init(&_lock, &attr);
|
||||
pthread_mutexattr_destroy(&attr);
|
||||
assert(result == 0);
|
||||
|
@ -160,9 +160,8 @@ alloc_thread_context() {
|
||||
|
||||
pthread_mutexattr_t attr;
|
||||
pthread_mutexattr_init(&attr);
|
||||
#ifdef PTHREAD_MUTEX_DEFAULT
|
||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_DEFAULT);
|
||||
#endif
|
||||
// The symbol PTHREAD_MUTEX_DEFAULT isn't always available?
|
||||
// pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_DEFAULT);
|
||||
int result = pthread_mutex_init(&context->_ready_mutex, &attr);
|
||||
pthread_mutexattr_destroy(&attr);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user