Worked on runtime and threadpool
This commit is contained in:
10
include/runtime.h
Normal file
10
include/runtime.h
Normal file
@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
typedef void (*system_tick_t)(int type);
|
||||
|
||||
void runtime_init();
|
||||
void runtime_loop();
|
||||
void runtime_destroy();
|
||||
|
||||
int runtime_callback_single(system_tick_t callback, long delay);
|
||||
int runtime_callback_many(system_tick_t callback, long period, long phase);
|
||||
9
include/thread_pool.h
Normal file
9
include/thread_pool.h
Normal file
@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
typedef struct thread_pool_t thread_pool_t;
|
||||
|
||||
thread_pool_t *thread_pool_create(size_t thread_count);
|
||||
void thread_pool_destroy(thread_pool_t *pool);
|
||||
|
||||
long thread_pool_run(thread_pool_t *pool, void *(*func)(void*), void *data);
|
||||
void thread_pool_join_all(thread_pool_t *pool);
|
||||
Reference in New Issue
Block a user