C Microkernel Realtime eXecutive
Realtime Operating System for Cortex-M based microcontrollers
 
Loading...
Searching...
No Matches
threads.h
1#pragma once
2
3#include <pthread.h>
4
5typedef pthread_t thrd_t;
6typedef int (*thrd_start_t)(void *);
7
8typedef pthread_mutex_t mtx_t;
9
10#define mtx_plain 0
11#define mtx_recursive 1
12#define mtx_timed 2
13
14#define thrd_success 0
15#define thrd_error 1
16
17int thrd_create(thrd_t * thr, thrd_start_t func, void * arg);
18int mtx_init(mtx_t * mtx, int type);
19int mtx_lock(mtx_t * mtx);
20int mtx_unlock(mtx_t * mtx);
21void mtx_destroy(mtx_t * mtx);