27 #ifndef EMBB_BASE_C_THREAD_H_ 28 #define EMBB_BASE_C_THREAD_H_ 47 #include <embb/base/c/internal/platform.h> 48 #include <embb/base/c/time.h> 49 #include <embb/base/c/core_set.h> 50 #include <embb/base/c/errors.h> 63 EMBB_THREAD_PRIORITY_IDLE,
64 EMBB_THREAD_PRIORITY_LOWEST,
65 EMBB_THREAD_PRIORITY_BELOW_NORMAL,
66 EMBB_THREAD_PRIORITY_NORMAL,
67 EMBB_THREAD_PRIORITY_ABOVE_NORMAL,
68 EMBB_THREAD_PRIORITY_HIGHEST,
69 EMBB_THREAD_PRIORITY_TIME_CRITICAL
151 embb_thread_t* thread,
179 embb_thread_t* thread,
184 embb_thread_priority_t priority,
206 embb_thread_t* thread,
220 const embb_thread_t* lhs,
222 const embb_thread_t* rhs
int embb_thread_create(embb_thread_t *thread, const embb_core_set_t *core_set, embb_thread_start_t function, void *arg)
Creates and runs a thread.
opaque_type embb_core_set_t
Opaque type representing a set of processor cores.
Definition: core_set.h:59
int embb_thread_equal(const embb_thread_t *lhs, const embb_thread_t *rhs)
Compares two threads represented by their handles for equality.
int embb_thread_join(embb_thread_t *thread, int *result_code)
Waits until the given thread has finished execution.
void embb_thread_set_max_count(unsigned int max)
Sets maximum number of threads handled by EMBB.
embb_thread_t embb_thread_current()
Returns the calling thread (that is, this thread).
int embb_thread_create_with_priority(embb_thread_t *thread, const embb_core_set_t *core_set, embb_thread_priority_t priority, embb_thread_start_t function, void *arg)
Creates and runs a thread.
opaque_type embb_thread_t
Opaque type representing a thread of execution.
Definition: thread.h:56
embb_thread_priority_t
Thread priority type.
Definition: thread.h:62
void embb_thread_yield()
Reschedule the current thread for later execution.
int(* embb_thread_start_t)(void *)
Thread start function pointer type.
Definition: thread.h:78
unsigned int embb_thread_get_max_count()
Returns the maximum number of threads handled by EMB2.