![]() |
Helixis 1.0
Task Programming API
|
Go to the source code of this file.
Data Structures | |
union | _hlx_channel_data |
struct | _hlx_channel |
struct | _hlx_channel_manager |
Defines | |
#define | HLX_CHAN_AVAILABLE (0) |
#define | HLX_CHAN_FILLED (3) |
#define | HLX_CHAN_WRITE_GENERATOR(name, type, union_var) |
#define | HLX_CHAN_READ_GENERATOR(name, type, union_var) |
Functions | |
void | _init_channel_manager (void) |
void | _destroy_channel_manager (void) |
#define HLX_CHAN_AVAILABLE (0) |
Definition at line 40 of file native_channels.h.
Referenced by hlx_chan_create().
#define HLX_CHAN_FILLED (3) |
Definition at line 41 of file native_channels.h.
#define HLX_CHAN_READ_GENERATOR | ( | name, | |
type, | |||
union_var | |||
) |
int __hlx_chan_read_##name(unsigned long id, type* value) \ { \ hlx_list_node *node; \ _hlx_channel *chan; \ \ if ((node = _hlx_get_channel_by_hash(id)) == 0) \ return (0); \ chan = (_hlx_channel *)node->data; \ if (chan->status != HLX_CHAN_FILLED) \ return (0); \ *value = chan->data.union_var; \ chan->status = HLX_CHAN_AVAILABLE; \ return (1); \ }
Definition at line 59 of file native_channels.h.
#define HLX_CHAN_WRITE_GENERATOR | ( | name, | |
type, | |||
union_var | |||
) |
int __hlx_chan_write_##name(unsigned long id, type value) \ { \ hlx_list_node *node; \ _hlx_channel *chan; \ \ if ((node = _hlx_get_channel_by_hash(id)) == 0) \ return (0); \ chan = (_hlx_channel *)node->data; \ if (chan->status != HLX_CHAN_AVAILABLE) \ return (0); \ chan->data.union_var = value; \ chan->status = HLX_CHAN_FILLED; \ return (1); \ }
Definition at line 43 of file native_channels.h.
void _destroy_channel_manager | ( | void | ) |
Definition at line 107 of file parallel_channels.c.
References _hlx_channel_manager::channels, hlx_api::free_entry, slist_delete(), slist_get_head_and_then_next(), and slist_get_user_data_from_element().
Referenced by hlx_core_destroy().
{ struct slist_element* it; _hlx_channel* chan; it = 0; while (slist_get_head_and_then_next(gl_channel_manager.channels, &it)) { slist_get_user_data_from_element(it, (void **)&chan); gl_api.free_entry(chan); } slist_delete(gl_channel_manager.channels); }
void _init_channel_manager | ( | void | ) |
Definition at line 102 of file parallel_channels.c.
References _hlx_channel_manager::channels, and slist_new().
Referenced by hlx_core_init().
{ slist_new(&gl_channel_manager.channels, 0, 0); }