![]() |
Arax -8d09c51940345c86062e8ef2427c705ae66e5926
A Runtime Framework for Decoupling Applications from Heterogeneous Accelerators
|
#include "list.h"
Go to the source code of this file.
Functions | |
utils_list_s * | utils_list_init (void *mem) |
void | utils_list_node_add (utils_list_node_s *head, utils_list_node_s *node) |
void | utils_list_add (utils_list_s *list, utils_list_node_s *node) |
utils_list_node_s * | utils_list_del (utils_list_s *list, utils_list_node_s *node) |
utils_list_node_s * | utils_list_pop_head (utils_list_s *list) |
utils_list_node_s * | utils_list_pop_tail (utils_list_s *list) |
size_t | utils_list_to_array (utils_list_s *list, void **array) |
void | utils_list_node_init (utils_list_node_s *node, void *owner) |
int | utils_list_node_linked (utils_list_node_s *node) |
void utils_list_add | ( | utils_list_s * | list, |
utils_list_node_s * | node ) |
Add node
to list
as the new head of the list.
Definition at line 20 of file list.c.
References utils_list_s::head, utils_list_s::length, and utils_list_node_add().
Referenced by _add_completion(), arax_accel_add_vaccel(), arax_object_register(), arax_pipe_add_orphan_vaccel(), and async_semaphore_dec().
utils_list_node_s * utils_list_del | ( | utils_list_s * | list, |
utils_list_node_s * | node ) |
Delete node
from list.
Definition at line 26 of file list.c.
References utils_list_s::length, utils_list_node::next, and utils_list_node::prev.
Referenced by arax_accel_del_vaccel(), arax_object_ref_dec(), arax_object_ref_dec_pre_locked(), arax_pipe_remove_orphan_vaccel(), async_semaphore_inc(), async_thread(), utils_list_pop_head(), and utils_list_pop_tail().
utils_list_s * utils_list_init | ( | void * | mem | ) |
Initialize a utils_list_s instance in node
.
mem | An allocated buffer of at least sizeof(utils_list_s) size. |
mem
if successful, NULL on failure. Definition at line 3 of file list.c.
References utils_list_s::head, utils_list_s::length, and utils_list_node_init().
Referenced by arax_accel_init(), arax_object_repo_init(), arax_pipe_init(), async_meta_init_once(), and async_semaphore_init().
void utils_list_node_add | ( | utils_list_node_s * | head, |
utils_list_node_s * | node ) |
Definition at line 12 of file list.c.
References utils_list_node::next, and utils_list_node::prev.
Referenced by utils_list_add().
void utils_list_node_init | ( | utils_list_node_s * | node, |
void * | owner ) |
Initialize a utils_list_node_s.
node | The utils_list_node_s to be initialized. |
owner | Pointer to the node 'usefull' data |
Definition at line 74 of file list.c.
References utils_list_node::next, utils_list_node::owner, and utils_list_node::prev.
Referenced by arax_object_register(), arax_vaccel_init(), async_completion_init(), and utils_list_init().
int utils_list_node_linked | ( | utils_list_node_s * | node | ) |
Return if node
is part of some list.
node | The utils_list_node_s to be initialized. |
Definition at line 81 of file list.c.
References utils_list_node::next.
Referenced by arax_pipe_remove_orphan_vaccel().
utils_list_node_s * utils_list_pop_head | ( | utils_list_s * | list | ) |
Remove first node from list
and return to caller.
list | A valid utils_list_s instance. |
list
, NULL if list was empty Definition at line 36 of file list.c.
References utils_list_s::head, utils_list_s::length, utils_list_node::next, and utils_list_del().
Referenced by arax_pipe_get_orphan_vaccel().
utils_list_node_s * utils_list_pop_tail | ( | utils_list_s * | list | ) |
Remove last node from list
and return to caller.
list | A valid utils_list_s instance. |
list
, NULL if list was empty Definition at line 47 of file list.c.
References utils_list_s::head, utils_list_s::length, utils_list_node::prev, and utils_list_del().
size_t utils_list_to_array | ( | utils_list_s * | list, |
void ** | array ) |
Convert list to array and return number of entries.
If array
is NULL just return the number of list node in list
. If array
is not NULL, fill array
with the node->owner values of all nodes.
list | A valid utils_list_s instance. |
array | An array of pointers to all node->owner. |
Definition at line 58 of file list.c.
References utils_list_s::length, utils_list_node::owner, and utils_list_for_each.
Referenced by arax_accel_get_assigned_vaccels().