Change Mac platform impl to inherit from Unix base
This commit is contained in:
@@ -17,8 +17,6 @@ private:
|
||||
|
||||
pthread_cond_t _cond;
|
||||
|
||||
private:
|
||||
|
||||
UnixConditionVariable(const UnixConditionVariable&);
|
||||
UnixConditionVariable& operator=(const UnixConditionVariable&);
|
||||
|
||||
@@ -61,13 +59,11 @@ public:
|
||||
{
|
||||
struct timeval tv;
|
||||
struct timespec ts;
|
||||
|
||||
gettimeofday(&tv, NULL);
|
||||
ts.tv_sec = time(NULL) + timeout / 1000;
|
||||
ts.tv_nsec = tv.tv_usec * 1000 + 1000 * 1000 * (timeout % 1000);
|
||||
ts.tv_sec += ts.tv_nsec / (1000 * 1000 * 1000);
|
||||
ts.tv_nsec %= (1000 * 1000 * 1000);
|
||||
|
||||
return pthread_cond_timedwait(&_cond, lock._mutexPtr, &ts) == 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ class UnixConditionVariable;
|
||||
class FLAXENGINE_API UnixCriticalSection
|
||||
{
|
||||
friend UnixConditionVariable;
|
||||
|
||||
private:
|
||||
|
||||
pthread_mutex_t _mutex;
|
||||
@@ -24,8 +23,6 @@ private:
|
||||
pthread_t _owningThreadId;
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
UnixCriticalSection(const UnixCriticalSection&);
|
||||
UnixCriticalSection& operator=(const UnixCriticalSection&);
|
||||
|
||||
|
||||
@@ -56,7 +56,9 @@ static void TranslateSockOptToNative(NetworkSocketOption option, int32* level, i
|
||||
SOCKOPT(NetworkSocketOption::NoDelay, IPPROTO_TCP, TCP_NODELAY)
|
||||
#endif
|
||||
SOCKOPT(NetworkSocketOption::IPv6Only, IPPROTO_IPV6, IPV6_V6ONLY)
|
||||
#ifdef IP_MTU
|
||||
SOCKOPT(NetworkSocketOption::Mtu, IPPROTO_IP, IP_MTU)
|
||||
#endif
|
||||
SOCKOPT(NetworkSocketOption::Type, SOL_SOCKET, SO_TYPE)
|
||||
#undef SOCKOPT
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user