KolibriOS kernel
sched.inc File Reference

Macros

#define lodsReg(reg)
 

Functions

void scheduler_add_thread ()
 Add the given thread to the given priority list for the scheduler. in: edx -> APPDATA, ecx = priority. More...
 
void scheduler_remove_thread ()
 Remove the given thread from the corresponding priority list for the scheduler. in: edx -> APPDATA. More...
 
void find_next_task ()
 info: Find next task to execute in: bl = SCHEDULE_ANY_PRIORITY: consider threads with any priority bl = SCHEDULE_HIGHER_PRIORITY: consider only threads with strictly higher priority than the current one, keep running the current thread if other ready threads have the same or lower priority retval: ebx = address of the APPDATA for the selected task (slot-base) edi = address of the TASKDATA for the selected task ZF = 1 if the task is the same warning: [current_slot_idx] = bh , [TASK_BASE] = edi – as result [current_slot] is not set to new value (ebx)!!! scratched: eax,ecx More...
 

Variables

label irq0
 
label change_task
 
dd context_counter
 far_jump: .offs dd ? .sel dw ? noname & halyavin More...
 
dd next_usage_update
 
dd timer_ticks
 
label update_counters
 
label updatecputimes
 
label do_change_task
 
ax Mov
 set gs selector unconditionally More...
 
rd scheduler_current
 [scheduler_current + i*4] = zero if there are no threads with priority i, pointer to APPDATA of the current thread with priority i otherwise. More...
 
TIMER struc
 
dd _next
 
dd _exp_time
 
dd _func
 
dd _arg
 
rd rdy_head
 
label pick_task
 
label shed
 param eax= task More...
 
label enqueue
 param eax= task More...
 

Macro Definition Documentation

◆ lodsReg

#define lodsReg (   reg)

Function Documentation

◆ find_next_task()

void find_next_task ( )

info: Find next task to execute in: bl = SCHEDULE_ANY_PRIORITY: consider threads with any priority bl = SCHEDULE_HIGHER_PRIORITY: consider only threads with strictly higher priority than the current one, keep running the current thread if other ready threads have the same or lower priority retval: ebx = address of the APPDATA for the selected task (slot-base) edi = address of the TASKDATA for the selected task ZF = 1 if the task is the same warning: [current_slot_idx] = bh , [TASK_BASE] = edi – as result [current_slot] is not set to new value (ebx)!!! scratched: eax,ecx

Source
core/sched.inc:274

◆ scheduler_add_thread()

void scheduler_add_thread ( )

Add the given thread to the given priority list for the scheduler. in: edx -> APPDATA, ecx = priority.

Source
core/sched.inc:198

◆ scheduler_remove_thread()

void scheduler_remove_thread ( )

Remove the given thread from the corresponding priority list for the scheduler. in: edx -> APPDATA.

Source
core/sched.inc:229

Variable Documentation

◆ _arg

dd _arg
Initial value
?
Source
core/sched.inc:359

◆ _exp_time

dd _exp_time
Initial value
?
Source
core/sched.inc:357

◆ _func

dd _func
Initial value
?
Source
core/sched.inc:358

◆ _next

dd _next
Initial value
?
Source
core/sched.inc:356

◆ change_task

label change_task

◆ context_counter

dd context_counter

far_jump: .offs dd ? .sel dw ? noname & halyavin

Initial value
0
Source
core/sched.inc:62

◆ do_change_task

label do_change_task

◆ enqueue

label enqueue

param eax= task

Source
core/sched.inc:411

◆ irq0

◆ Mov

gs Mov

set gs selector unconditionally

Initial value
, graph_data
Source
core/sched.inc:140
Initial value
, ax
Source
core/sched.inc:141

◆ next_usage_update

dd next_usage_update
Initial value
0
Source
core/sched.inc:63

◆ pick_task

label pick_task

◆ rdy_head

rd rdy_head
Initial value
16
Source
core/sched.inc:364

◆ scheduler_current

rd scheduler_current

[scheduler_current + i*4] = zero if there are no threads with priority i, pointer to APPDATA of the current thread with priority i otherwise.

Initial value
NR_SCHED_QUEUES
Source
core/sched.inc:193

◆ shed

label shed

param eax= task

retval eax= task ebx= queue ecx= front if 1 or back if 0

Source
core/sched.inc:394

◆ struc

TIMER struc
Initial value
Source
core/sched.inc:354

◆ timer_ticks

dd timer_ticks
Initial value
0
Source
core/sched.inc:64

◆ update_counters

label update_counters

◆ updatecputimes

label updatecputimes