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)
85#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
117 int len =
bufSize /
sizeof(*buf);
118 for (
int i = 0; i < len; ++i)
121 switch (info->Relationship)
133 if (info->Cache.Level == 1)
137 else if (info->Cache.Level == 2)
141 else if (info->Cache.Level == 3)
153 if (
procInfo->numTeamMasks < btProcessorInfo::maxNumTeamMasks)
180 ThreadFunc m_userThreadFunc;
223btThreadSupportWin32::~btThreadSupportWin32()
230 btThreadSupportWin32::btThreadStatus* status = (btThreadSupportWin32::btThreadStatus*)
lpParam;
235 void*
userPtr = status->m_userPtr;
240 status->m_userThreadFunc(
userPtr);
241 status->m_status = 2;
242 SetEvent(status->m_eventCompleteHandle);
247 status->m_status = 3;
248 printf(
"Thread with taskId %i with handle %p exiting\n", status->m_taskId, status->m_threadHandle);
249 SetEvent(status->m_eventCompleteHandle);
253 printf(
"Thread TERMINATED\n");
272int btThreadSupportWin32::waitForResponse()
296void btThreadSupportWin32::waitForAllTasks()
332 printf(
"starting thread %d\n", i);
389void 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