Create simple thread library

This commit is contained in:
Piotr Krygier committed 2023-08-14 14:49:57 +02:00
1 parent 3d538eaa2c
commit 507db80fb1
7 files changed
+63 -4

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
#include "rse_task.h"
uint8_t rse_create_task(rse_thread_t* thread_id, thread_worker_t callback, void* args)
{
uint8_t result = 0;
result = pthread_create(thread_id, NULL, callback, args);
return result; //TODO: Do error handling
}
uint8_t rse_task_join(rse_thread_t* thread_id)
{
uint8_t result = 0;
result = pthread_join(*thread_id, NULL);
return result; //TODO: Do error handling
}
void rse_task_delay(void)
{}