/** * @file task.h * @author Piotr Krygier (everyonecancode@gmail.com) * @brief Threads wrapper * @version 0.1 * @date 2023-08-14 * * @copyright Copyright (c) 2023 * */ #ifndef THREADS_H #define THREADS_H #include #ifdef __linux__ #include typedef pthread_t thread_t; #endif typedef void*(*thread_worker_t)(void*); uint8_t create_task(thread_t* thread_id, thread_worker_t callback, void* args); uint8_t task_join(thread_t* thread_id); void task_exit(void); #endif /* THREADS_H */