MCPcopy Create free account
hub / github.com/RenderKit/embree / createThread

Function createThread

common/sys/thread.cpp:111–117  ·  view source on GitHub ↗

! creates a hardware thread running on specific core */

Source from the content-addressed store, hash-verified

109
110 /*! creates a hardware thread running on specific core */
111 thread_t createThread(thread_func f, void* arg, size_t stack_size, ssize_t threadID)
112 {
113 HANDLE thread = CreateThread(nullptr, stack_size, threadStartup, new ThreadStartupData(f,arg), 0, nullptr);
114 if (thread == nullptr) FATAL("CreateThread failed");
115 if (threadID >= 0) setAffinity(thread, threadID);
116 return thread_t(thread);
117 }
118
119 /*! the thread calling this function gets yielded */
120 void yield() {

Callers 5

runMethod · 0.85
runMethod · 0.85
setNumThreadsMethod · 0.85
runMethod · 0.85
runMethod · 0.85

Calls 2

setAffinityFunction · 0.85
mapThreadIDFunction · 0.85

Tested by

no test coverage detected