12345678910111213141516 |
- #include "thread/Thread.hpp"
- #include <threads.h>
- check_return Core::Error Core::Thread::start(Function f, void* p) {
- ASSERT_ALIGNED_DATA(thread, thrd_t);
- return thrd_create(thread.as<thrd_t>(), f, p) != thrd_success
- ? Error::THREAD_ERROR
- : Error::NONE;
- }
- check_return Core::Error Core::Thread::join(int* returnValue) {
- return thrd_join(*thread.as<thrd_t>(), returnValue) != thrd_success
- ? Error::THREAD_ERROR
- : Error::NONE;
- }
|