Commit b7da1add authored by camp's avatar camp

I should have added the define VISIT_THREADS around the Thread pool code.

I have added that so it will only build when the threading is defined.

The thread pool is not ready for Windows and it turns out that Mac has 
some issues with pthread affinity. So I turn off affinity for Mac for now.
Mac has different code to do affinity.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@21214 18c085ea-50e0-402c-830e-de6fd14e8384
parent 5089a9af
......@@ -1044,6 +1044,11 @@ INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindVisItVTK.cmake)
IF(VISIT_THREAD)
ADD_DEFINITIONS(-DVISIT_ATOMIC_USE_GCC_ATOMIC)
ADD_DEFINITIONS(-DVISIT_THREADS)
IF(APPLE)
ADD_DEFINITIONS(-DTURN_OFF_THREAD_SET_AFFINITY)
ENDIF(APPLE)
MESSAGE(STATUS "Threading for VisIt: ON")
ELSE(VISIT_THREAD)
MESSAGE(STATUS "Threading for VisIt: OFF")
......
/***********************************************************************
ThreadPool.cpp
*/
#if defined(VISIT_THREADS)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......@@ -479,3 +481,6 @@ void *ThreadPoolWorker::GetWorkItem( ThreadPool *tpool )
return( rnt );
}
#endif // VISIT_THREADS
......@@ -6,6 +6,8 @@ ThreadPool.h
#ifndef _THREAD_POOL_H_
#define _THREAD_POOL_H_
#if defined(VISIT_THREADS)
#include <stdio.h>
#include <pthread.h>
#include <string.h>
......@@ -164,5 +166,6 @@ inline void PthreadCondWait( pthread_cond_t &cond, pthread_mutex_t &lock )
}
}
#endif // VISIT_THREADS
#endif // _THREAD_POOL_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment