libclod
C library for interacting with NBTs, region files, LOD data and other things.
Loading...
Searching...
No Matches
thread_impl.h
1#ifndef LIBCLOD_THREAD_IMPL_H
2#define LIBCLOD_THREAD_IMPL_H
3
4#include "config.h"
5#include <clod/thread.h>
6
7#define ALIGN(size, alignment) (((size) + (alignment) - 1) &~ (typeof(size))((alignment) - 1))
8
10 int arg_count;
11 size_t *arg_sizes;
12 char **arg_vector;
13};
14
15size_t args_size(const struct clod_process_args *args);
16void args_copy(struct clod_process_args *dst, const struct clod_process_args *src);
17
19 enum clod_process_type type;
20};
21
22#if CLOD_HAVE_PTHREAD
23 enum clod_process_result clod_process_start_pthread(struct clod_process_opts *opts, struct clod_process_common **process_out);
24 enum clod_process_result clod_process_join_pthread(struct clod_process_common *process);
25#endif
26
27#if CLOD_HAVE_STDTHREADS
28 enum clod_process_result clod_process_start_stdthreads(struct clod_process_opts *opts, struct clod_process_common **process_out);
29 enum clod_process_result clod_process_join_stdthreads(struct clod_process_common *process);
30#endif
31
32#if CLOD_HAVE_LINUX_SCHED
33 enum clod_process_result clod_process_start_linux(struct clod_process_opts *opts, struct clod_process_common **process_out);
34 enum clod_process_result clod_process_join_linux(struct clod_process_common *process);
35#endif
36
37#endif
clod_process_type
Definition thread.h:25