MCPcopy Create free account
hub / github.com/SmingHub/Sming / host_thread_wait

Function host_thread_wait

Sming/Arch/Host/Components/hostlib/threads.cpp:263–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263void host_thread_wait(int ms)
264{
265 constexpr int SCHED_WAIT{2};
266 if(ms >= 0 && ms <= SCHED_WAIT) {
267 return;
268 }
269#ifdef __WIN32
270 WaitForSingleObject(host_thread_semaphore, (ms < 0) ? INFINITE : ms - SCHED_WAIT);
271#else
272 if(ms < 0) {
273 host_thread_semaphore.wait();
274 } else if(ms > SCHED_WAIT) {
275 host_thread_semaphore.timedwait((ms - SCHED_WAIT) * 1000);
276 }
277#endif
278}
279
280void host_thread_kick()
281{

Callers 1

mainFunction · 0.85

Calls 2

timedwaitMethod · 0.80
waitMethod · 0.45

Tested by

no test coverage detected