16#if defined(_WIN32) && BT_THREADSAFE
43 for (
int i = 0; i <
procInfo.numTeamMasks; ++i)
47 return procInfo.processorTeamMasks[i];
56 for (
int i = 0; i <
procInfo.numTeamMasks; ++i)
113 int len =
bufSize /
sizeof(*buf);
114 for (
int i = 0; i < len; ++i)
117 switch (info->Relationship)
129 if (info->Cache.Level == 1)
133 else if (info->Cache.Level == 2)
137 else if (info->Cache.Level == 3)
149 if (
procInfo->numTeamMasks < btProcessorInfo::maxNumTeamMasks)
175 ThreadFunc m_userThreadFunc;
218btThreadSupportWin32::~btThreadSupportWin32()
225 btThreadSupportWin32::btThreadStatus* status = (btThreadSupportWin32::btThreadStatus*)
lpParam;
230 void*
userPtr = status->m_userPtr;
235 status->m_userThreadFunc(
userPtr);
236 status->m_status = 2;
237 SetEvent(status->m_eventCompleteHandle);
242 status->m_status = 3;
243 printf(
"Thread with taskId %i with handle %p exiting\n", status->m_taskId, status->m_threadHandle);
244 SetEvent(status->m_eventCompleteHandle);
248 printf(
"Thread TERMINATED\n");
267int btThreadSupportWin32::waitForResponse()
291void btThreadSupportWin32::waitForAllTasks()
327 printf(
"starting thread %d\n", i);
384void btThreadSupportWin32::stopThreads()
#define btAlignedFree(ptr)
#define btAlignedAlloc(size, alignment)
const T & btMax(const T &a, const T &b)
const T & btMin(const T &a, const T &b)
const unsigned int BT_MAX_THREAD_COUNT
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
virtual ~btCriticalSection()
virtual int getCacheFriendlyNumThreads() const =0
virtual int getLogicalToPhysicalCoreRatio() const =0
virtual void waitForAllTasks()=0
static btThreadSupportInterface * create(const ConstructionInfo &info)
virtual void runTask(int threadIndex, void *userData)=0
virtual int getNumWorkerThreads() const =0