VirtualBox

Changeset 63004 in vbox for trunk/src/VBox/Runtime/r3/posix


Ignore:
Timestamp:
Aug 4, 2016 5:09:07 PM (8 years ago)
Author:
vboxsync
Message:

IPRT: NetBSD does't have pthread_mutex_timedlock() so use the fallback
version we already have for Darwin. Rename the fallback function to
rtSemFallbackPthreadMutexTimedlock().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/posix/semmutex-posix.cpp

    r62564 r63004  
    6767};
    6868
    69 #ifdef RT_OS_DARWIN
     69#if defined(RT_OS_DARWIN) || defined(RT_OS_NETBSD)
    7070/**
    7171 * This function emulate pthread_mutex_timedlock on Mac OS X
    7272 */
    73 static int DarwinPthreadMutexTimedlock(pthread_mutex_t * mutex, const struct timespec * pTsAbsTimeout)
     73static int rtSemFallbackPthreadMutexTimedlock(pthread_mutex_t * mutex, const struct timespec * pTsAbsTimeout)
    7474{
    7575    int rc = 0;
     
    298298
    299299        /* take mutex */
    300 #ifndef RT_OS_DARWIN
     300#if !defined(RT_OS_DARWIN) && !defined(RT_OS_NETBSD)
    301301        int rc = pthread_mutex_timedlock(&pThis->Mutex, &ts);
    302302#else
    303         int rc = DarwinPthreadMutexTimedlock(&pThis->Mutex, &ts);
     303        int rc = rtSemFallbackPthreadMutexTimedlock(&pThis->Mutex, &ts);
    304304#endif
    305305        RTThreadUnblocked(hThreadSelf, RTTHREADSTATE_MUTEX);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette