mutek/scheduler.h header reference
[Kernel services module]

The source code of this header can be browsed online.

Description  

Kernel execution context scheduler

Members  

Types  

Functions  

Variables  

Macro  

Members detail  

#define GCT_CONTAINER_ALGO_sched_queue  

This macro is declared in mutek/scheduler.h source file, line 49.

Preprocessor condition: defined( CONFIG_MUTEK_CONTEXT_SCHED )

#define GCT_CONTAINER_LOCK_sched_queue  

This macro is declared in mutek/scheduler.h source file, line 50.

Preprocessor condition: defined( CONFIG_MUTEK_CONTEXT_SCHED )

#define MUTEK_SCHEDULER_H_  

This macro is declared in mutek/scheduler.h source file, line 23.

#define SCHED_CANDIDATE_FCN(n)  

This macro is declared in mutek/scheduler.h source file, line 37.

scheduler context candidate checking function

#define SCHED_QUEUE_INITIALIZER  

This macro is declared in mutek/scheduler.h source file, line 82.

Preprocessor condition: defined( CONFIG_MUTEK_CONTEXT_SCHED )

void sched_affinity_add(struct sched_context_s *sched_ctx, cpu_id_t cpu)  

This function function set processor affinity sothat scheduler context will run on this cpu

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

void sched_affinity_all(struct sched_context_s *sched_ctx)  

This function function set processor affinity sothat scheduler context will run on all cpu

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

void sched_affinity_clear(struct sched_context_s *sched_ctx)  

This function function set processor affinity sothat scheduler context will run on all cpu

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

void sched_affinity_remove(struct sched_context_s *sched_ctx, cpu_id_t cpu)  

This function function set processor affinity sothat scheduler context will not run on this cpu

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

void sched_affinity_single(struct sched_context_s *sched_ctx, cpu_id_t cpu)  

This function function set processor affinity sothat scheduler context will run on a single cpu

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

typedef bool_t (sched_candidate_fcn_t)(struct sched_context_s *sched_ctx)   

This typedef is declared in mutek/scheduler.h source file, line 41.

scheduler context candidate checking function type

This declaration involves expansion of the SCHED_CANDIDATE_FCN macro.

void sched_context_candidate_fcn(struct sched_context_s *sched_ctx, sched_candidate_fcn_t *fcn)  

This function function setups a scheduler context candidate checking function.

This is available when CONFIG_MUTEK_CONTEXT_SCHED_CANDIDATE_FCN is defined.

void sched_context_exit(void )  

This function is declared in mutek/scheduler.h source file, line 169.

This function jumps to next context without saving current context. current context will be lost. Must be called with interrupts disabled and main sched queue locked.

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

See also sched_preempt_stop.

void sched_context_init(struct sched_context_s *sched_ctx, struct context_s *context)  

This function initializes scheduler context.

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

struct sched_context_s  

This struct is declared in mutek/scheduler.h source file, line 54.

Preprocessor condition: defined( CONFIG_MUTEK_CONTEXT_SCHED )

FieldDescription
struct scheduler_s * scheduler;keep track of associated scheduler queue
struct context_s * context;execution context
void * priv;
uint8_t priority;
cpu_bitmap_t cpu_map;
sched_candidate_fcn_t * is_candidate;

See also sched_queue_item_t.

void sched_context_start(struct sched_context_s *sched_ctx)  

This function enqueues scheduler context for execution. Must be called with interrupts disabled

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

void sched_context_switch(void )  

This function is declared in mutek/scheduler.h source file, line 160.

This function switches to next context. Must be called with interrupts disabled.

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

See also sched_preempt_switch.

void sched_context_wake(sched_queue_root_t *queue, struct sched_context_s *sched_ctx)  

This function function removes a given context from passed queue and push it back in running queue. This function Must be called with interrupts disabled and queue locked.

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

struct sched_context_s * sched_get_current(void )  

This function is declared in mutek/scheduler.h source file, line 99.

This function returns the current scheduler context

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

struct context_s * sched_preempt_stop(void )  

This function is a context preemption handler.

This function returns next scheduler candidate or processor idle context if none is available. Current context is not pushed back on running queue.

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

See also context_set_preempt, CONTEXT_PREEMPT and sched_context_stop.

struct context_s * sched_preempt_switch(void )  

This function is a context preemption handler.

This function pushes current context back on running queue and returns next scheduler candidate. If no other context is available on running queue, this function does nothing and return NULL.

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

See also context_set_preempt, CONTEXT_PREEMPT and sched_context_switch.

struct context_s * sched_preempt_wait_unlock(void )  

This function is a context preemption handler.

This function pushes current context on the wait queue specified in sched_preempt_wait_unlock_q. The function unlocks the queue and returns the next candidate context which may be the processor idle context.

This is available when CONFIG_MUTEK_CONTEXT_SCHED and CONFIG_HEXO_CONTEXT_PREEMPT are both defined.

See also context_set_preempt, CONTEXT_PREEMPT and sched_wait_unlock.

sched_queue_root_t * sched_preempt_wait_unlock_q  

This variable is declared in mutek/scheduler.h source file, line 144.

This is available when CONFIG_MUTEK_CONTEXT_SCHED and CONFIG_HEXO_CONTEXT_PREEMPT are both defined.

This declaration involves expansion of the CPU_LOCAL macro.

See also sched_preempt_wait_unlock.

void sched_queue_destroy(sched_queue_root_t *queue)  

This function frees resources associated with context queue.

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

typedef void * sched_queue_entry_t  

This typedef is declared in mutek/scheduler.h source file, line 75.

Preprocessor condition: defined( CONFIG_MUTEK_CONTEXT_SCHED )

error_t sched_queue_init(sched_queue_root_t *queue)  

This function initializes context queue.

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

typedef struct sched_context_s * sched_queue_item_t  

This typedef is declared in mutek/scheduler.h source file, line 75.

Preprocessor condition: defined( CONFIG_MUTEK_CONTEXT_SCHED )

void sched_queue_rdlock(sched_queue_root_t *queue)  

This function locks context queue for reading.

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

typedef void * sched_queue_root_t  

This typedef is declared in mutek/scheduler.h source file, line 75.

Preprocessor condition: defined( CONFIG_MUTEK_CONTEXT_SCHED )

typedef struct __empty_s sched_queue_root_t  

This typedef is declared in mutek/scheduler.h source file, line 91.

Preprocessor condition: not defined( CONFIG_MUTEK_CONTEXT_SCHED )

void sched_queue_unlock(sched_queue_root_t *queue)  

This function unlocks context queue.

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

void sched_queue_wrlock(sched_queue_root_t *queue)  

This function locks context queue for writting.

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

void sched_stop_unlock(lock_t *lock)  

This function switches to next context without pushing current context back in running queue and unlock passed scheduler queue.

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

See also sched_context_stop.

struct context_s * sched_tmp_context(void )  

This function is declared in mutek/scheduler.h source file, line 109.

This function returns a cpu local context for temporary stack use with cpu_context_stack_use, useful to run other context exit/destroy. The processor idle context is actually returned. This context must be used with interrupts disabled.

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

typedef void (sched_wait_cb_t)(void *ctx)   

This typedef is declared in mutek/scheduler.h source file, line 215.

void sched_wait_unlock(sched_queue_root_t *queue)  

This function is declared in mutek/scheduler.h source file, line 182.

This function pushes current context in the 'queue', unlock it and switch to next context available in the 'root' queue. Must be called with interrupts disabled.

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

See also sched_preempt_wait_unlock.

struct sched_context_s * sched_wake(sched_queue_root_t *queue)  

This function removes first context from passed queue and push it back in running queue. This function returns a pointer to context or NULL if queue was empty. This function Must be called with interrupts disabled and queue locked.

This is available when CONFIG_MUTEK_CONTEXT_SCHED is defined.

struct sched_context_s * sched_cur  

This variable is declared in mutek/scheduler.h source file, line 86.

This variable is for internal use only.

Preprocessor condition: defined( CONFIG_MUTEK_CONTEXT_SCHED )

struct sched_context_s sched_idle  

This variable is declared in mutek/scheduler.h source file, line 88.

This variable is for internal use only.

Preprocessor condition: defined( CONFIG_MUTEK_CONTEXT_SCHED )

This declaration involves expansion of the CPU_LOCAL macro.

struct context_s * sched_wait_unlock_ctx(sched_queue_root_t *queue)  

This function is for internal use only.

Valid XHTML 1.0 StrictGenerated by diaxen on Wed Oct 17 21:18:38 2018 using MkDoc