5 #ifndef vnsw_agent_task_thread_api_h
6 #define vnsw_agent_task_thread_api_h
15 #define THREAD_TO_STRUCT(function, structure, member) \
16 static inline structure * (function)(task_thread *address) { \
18 return (structure *)((char*)address - offsetof(structure, member));\
35 #define FOR_ALL_CIRCULAR_THREAD_ENTRIES(head, current) \
36 for ((current) = thread_next_node(head); \
37 !thread_circular_thread_head(head, (current)); \
38 (current) = thread_next_node(current))
task_thread * thread_next_node(task_thread *node)
boolean thread_circular_thread_empty(task_thread *head)
task_thread * thread_circular_top(task_thread *head)
struct thread_ task_thread
task_thread * thread_circular_dequeue_top(task_thread *head)
task_thread * thread_circular_thread_next(task_thread *head, task_thread *node)
boolean thread_node_on_thread(const task_thread *node)
void thread_circular_add_bottom(task_thread *head, task_thread *node)
void thread_new_circular_thread(task_thread *head)
void thread_circular_add_top(task_thread *head, task_thread *node)
void thread_remove(task_thread *node)
boolean thread_circular_thread_head(task_thread *head, task_thread *node)