Add automatically-generated names to threads
This commit is contained in:
@@ -28,7 +28,7 @@ extern "C" {
|
||||
# define event_t plat_event_t
|
||||
# define mutex_t plat_mutex_t
|
||||
|
||||
# define thread_create plat_thread_create
|
||||
# define thread_create_named plat_thread_create_named
|
||||
# define thread_wait plat_thread_wait
|
||||
# define thread_create_event plat_thread_create_event
|
||||
# define thread_set_event plat_thread_set_event
|
||||
@@ -48,7 +48,8 @@ typedef void thread_t;
|
||||
typedef void event_t;
|
||||
typedef void mutex_t;
|
||||
|
||||
extern thread_t *thread_create(void (*thread_func)(void *param), void *param);
|
||||
#define thread_create(thread_func, param) thread_create_named((thread_func), (param), #thread_func)
|
||||
extern thread_t *thread_create_named(void (*thread_func)(void *param), void *param, const char *name);
|
||||
extern int thread_wait(thread_t *arg);
|
||||
extern event_t *thread_create_event(void);
|
||||
extern void thread_set_event(event_t *arg);
|
||||
|
||||
Reference in New Issue
Block a user