![]() |
Helixis 1.0
Task Programming API
|
#include "platforms.h"#include "compilers.h"#include "atomic.h"#include "api.h"#include "tools.h"#include "config.h"#include "task_groups.h"#include "task.h"#include "sched.h"#include "events.h"#include "channels.h"Go to the source code of this file.
Functions | |
| int | hlx_core_init (void) |
| void | hlx_core_start (void) |
| void | hlx_core_stop (void) |
| void | hlx_core_destroy (void) |
| void hlx_core_destroy | ( | void | ) |
Free all resources
Definition at line 89 of file parallel_core.c.
References _destroy_channel_manager(), and hlx_scheduler_destruct().
| int hlx_core_init | ( | void | ) |
Initialize the Framework
Definition at line 60 of file parallel_core.c.
References _init_channel_manager(), hlx_api::aligned_free_entry, hlx_api::aligned_malloc_entry, hlx_api::atomic_cas_entry, hlx_api::atomic_dcas_entry, hlx_api::atomic_decr_entry, hlx_api::atomic_incr_entry, hlx_api::free_entry, hlx_memcpy(), hlx_scheduler_construct(), hlx_api::malloc_entry, hlx_api::memcpy_entry, hlx_api::thread_api, hlx_thread_api::thread_construct, hlx_thread_api::thread_destruct, hlx_thread_api::thread_execute, hlx_thread_api::thread_pause_if_needed, hlx_thread_api::thread_resume, hlx_thread_api::thread_suspend, hlx_thread_api::thread_wait_for, and hlx_thread_api::thread_yield.
{
if (gl_api.memcpy_entry == 0)
gl_api.memcpy_entry = hlx_memcpy;
if (gl_api.malloc_entry == 0 || gl_api.free_entry == 0 ||
gl_api.atomic_cas_entry == 0 || gl_api.atomic_dcas_entry == 0 ||
gl_api.atomic_incr_entry == 0 || gl_api.atomic_decr_entry == 0 ||
gl_api.aligned_free_entry == 0 || gl_api.aligned_malloc_entry == 0)
return (0);
if (gl_api.thread_api.thread_construct == 0 || gl_api.thread_api.thread_destruct == 0 ||
gl_api.thread_api.thread_execute == 0 || gl_api.thread_api.thread_pause_if_needed == 0 ||
gl_api.thread_api.thread_resume == 0 || gl_api.thread_api.thread_suspend == 0 ||
gl_api.thread_api.thread_wait_for == 0 || gl_api.thread_api.thread_yield == 0)
return (0);
_init_channel_manager();
hlx_scheduler_construct();
return (1);
}
| void hlx_core_start | ( | void | ) |
Start the framework
Definition at line 79 of file parallel_core.c.
References hlx_scheduler_schedule().
{
hlx_scheduler_schedule();
}
| void hlx_core_stop | ( | void | ) |
Stop the framework
Definition at line 84 of file parallel_core.c.
References hlx_sheduler_end_all_threads().
{
hlx_sheduler_end_all_threads();
}
1.7.4