84 if (node->thread == thread)
#define MOS_ASSERT_X(cond, msg,...)
MOSAPI void linked_list_init(list_node_t *head_node)
Initialise a circular double linked list.
MOSAPI void list_node_append(list_node_t *head, list_node_t *item)
#define list_foreach(t, v, h)
Iterate over a list.
#define list_node(element)
Get the ‘list_node’ of a list element. This is exactly the reverse of ‘list_entry’ above.
#define list_entry(node, type)
Get the container struct of a list node.
list_node_t list_head
A linked list head.
MOSAPI bool list_is_empty(const list_node_t *head)
#define list_remove(element)
#define container_of(ptr, type, member)
static void naive_sched_add_thread(scheduler_t *instance, thread_t *thread)
static thread_t * naive_sched_select_next(scheduler_t *instance)
static const scheduler_ops_t naive_sched_ops
static naive_sched_t naive_sched
static void naive_sched_remove_thread(scheduler_t *instance, thread_t *thread)
static slab_t * naivesched_node_slab
static void naive_sched_init(scheduler_t *instance)
#define pr_dinfo(feat, fmt,...)
#define pr_dinfo2(feat, fmt,...)
#define MOS_SCHEDULER(_name, _i)
#define SLAB_AUTOINIT(name, var, type)
#define spinlock_init(lock)
#define spinlock_acquire(lock)
#define spinlock_release(lock)
list_head threads
list of runnable threads
spinlock_t state_lock
protects the thread state