MOS Source Code
Loading...
Searching...
No Matches
naive.c File Reference
+ Include dependency graph for naive.c:

Go to the source code of this file.

Classes

struct  naive_sched_t
 
struct  naive_sched_node_t
 

Functions

 SLAB_AUTOINIT ("naivesched_node", naivesched_node_slab, naive_sched_node_t)
 
static void naive_sched_init (scheduler_t *instance)
 
static thread_tnaive_sched_select_next (scheduler_t *instance)
 
static void naive_sched_add_thread (scheduler_t *instance, thread_t *thread)
 
static void naive_sched_remove_thread (scheduler_t *instance, thread_t *thread)
 
 MOS_PUT_IN_SECTION (".mos.schedulers", scheduler_info_t, MOS_CONCAT(naive, __COUNTER__), { .name="naive",.scheduler=&naive_sched.base })
 

Variables

static slab_tnaivesched_node_slab = NULL
 
static const scheduler_ops_t naive_sched_ops
 
static naive_sched_t naive_sched
 

Function Documentation

◆ SLAB_AUTOINIT()

SLAB_AUTOINIT ( "naivesched_node" ,
naivesched_node_slab ,
naive_sched_node_t  )

◆ naive_sched_init()

static void naive_sched_init ( scheduler_t * instance)
static

Definition at line 27 of file naive.c.

+ Here is the call graph for this function:

◆ naive_sched_select_next()

static thread_t * naive_sched_select_next ( scheduler_t * instance)
static

Definition at line 35 of file naive.c.

+ Here is the call graph for this function:

◆ naive_sched_add_thread()

static void naive_sched_add_thread ( scheduler_t * instance,
thread_t * thread )
static

Definition at line 61 of file naive.c.

+ Here is the call graph for this function:

◆ naive_sched_remove_thread()

static void naive_sched_remove_thread ( scheduler_t * instance,
thread_t * thread )
static

Definition at line 76 of file naive.c.

◆ MOS_PUT_IN_SECTION()

MOS_PUT_IN_SECTION ( ".mos.schedulers" ,
scheduler_info_t ,
MOS_CONCAT(naive, __COUNTER__) ,
{ .name="naive",.scheduler=&naive_sched.base }  )

Variable Documentation

◆ naivesched_node_slab

slab_t* naivesched_node_slab = NULL
static

Definition at line 24 of file naive.c.

Referenced by naive_sched_add_thread().

◆ naive_sched_ops

const scheduler_ops_t naive_sched_ops
static
Initial value:
= {
.select_next = naive_sched_select_next,
.add_thread = naive_sched_add_thread,
.remove_thread = naive_sched_remove_thread,
}
static void naive_sched_add_thread(scheduler_t *instance, thread_t *thread)
Definition naive.c:61
static thread_t * naive_sched_select_next(scheduler_t *instance)
Definition naive.c:35
static void naive_sched_remove_thread(scheduler_t *instance, thread_t *thread)
Definition naive.c:76
static void naive_sched_init(scheduler_t *instance)
Definition naive.c:27

Definition at line 94 of file naive.c.

◆ naive_sched

naive_sched_t naive_sched
static
Initial value:
= {
.base.ops = &naive_sched_ops,
}
static const scheduler_ops_t naive_sched_ops
Definition naive.c:94

Definition at line 101 of file naive.c.

Referenced by naive_sched_add_thread(), naive_sched_init(), naive_sched_remove_thread(), and naive_sched_select_next().