diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-12-21 03:55:00 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-12-21 03:55:00 +0100 |
commit | eac073d479dfbe5ecf9c5fc7180f7b29da6d1298 (patch) | |
tree | 14db2b6f4c921e7c462b20d59a61fc2cf5446625 /src/common/thread.h | |
parent | 62919eee3ef5fbad678034c21948abed523fa47e (diff) | |
download | blogc-eac073d479dfbe5ecf9c5fc7180f7b29da6d1298.tar.gz blogc-eac073d479dfbe5ecf9c5fc7180f7b29da6d1298.tar.bz2 blogc-eac073d479dfbe5ecf9c5fc7180f7b29da6d1298.zip |
wip
Diffstat (limited to 'src/common/thread.h')
-rw-r--r-- | src/common/thread.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/common/thread.h b/src/common/thread.h new file mode 100644 index 0000000..850d375 --- /dev/null +++ b/src/common/thread.h @@ -0,0 +1,23 @@ +/* + * blogc: A blog compiler. + * Copyright (C) 2014-2018 Rafael G. Martins <rafael@rafaelmartins.eng.br> + * + * This program can be distributed under the terms of the BSD License. + * See the file LICENSE. + */ + +#ifndef _THREAD_H +#define _THREAD_H + +#include <stdbool.h> + +typedef void* (*bc_thread_func_t) (void *arg); + +typedef struct _bc_thread_t bc_thread_t; + +bc_thread_t* bc_thread_create(bc_thread_func_t func, void *arg, bool detached, + bc_error_t **err); +void bc_thread_join(bc_thread_t *thread, bc_error_t **err); +void bc_thread_free(bc_thread_t *thread); + +#endif /* _THREAD_H */ |