! creates a hardware thread running on specific core */
| 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() { |
no test coverage detected