-// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#include <pthread.h>
#include <semaphore.h>
+#ifdef __APPLE__
+#include <dispatch/dispatch.h>
+#endif
#include "BaseTraceCollector.hxx"
#include "BasicsGenericDestructor.hxx"
static BaseTraceCollector *_myThreadTrace;
LocalTrace_TraceInfo _myBuffer[TRACE_BUFFER_SIZE];
+#ifdef __APPLE__
+ dispatch_semaphore_t _freeBufferSemaphore; // to wait until there is a free buffer
+ dispatch_semaphore_t _fullBufferSemaphore; // to wait until there is a buffer to print
+#else
sem_t _freeBufferSemaphore; // to wait until there is a free buffer
sem_t _fullBufferSemaphore; // to wait until there is a buffer to print
+#endif
pthread_mutex_t _incrementMutex; // to lock position variables for increment
unsigned long _position;
unsigned long _insertPos;