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) ZF = 1 if the task is the same warning: [current_slot_idx] = bh – 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) ZF = 1 if the task is the same warning: [current_slot_idx] = bh – as result [current_slot] is not set to new value (ebx)!!! scratched: eax,ecx

Source
core/sched.inc:265

◆ 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:190

◆ 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:221

Variable Documentation

◆ _arg

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

◆ _exp_time

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

◆ _func

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

◆ _next

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

◆ 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:60

◆ do_change_task

label do_change_task

◆ enqueue

label enqueue

param eax= task

Source
core/sched.inc:408

◆ irq0

◆ Mov

gs Mov

set gs selector unconditionally

Initial value
, graph_data
Source
core/sched.inc:132
Initial value
, ax
Source
core/sched.inc:133

◆ next_usage_update

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

◆ pick_task

label pick_task

◆ rdy_head

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

◆ 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:185

◆ shed

label shed

param eax= task

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

Source
core/sched.inc:391

◆ struc

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

◆ timer_ticks

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

◆ update_counters

label update_counters

◆ updatecputimes

label updatecputimes