ST20-C1 STMICROELECTRONICS [STMicroelectronics], ST20-C1 Datasheet - Page 159

no-image

ST20-C1

Manufacturer Part Number
ST20-C1
Description
Instruction Set Reference Manual
Manufacturer
STMICROELECTRONICS [STMicroelectronics]
Datasheet
timeslice
Code: FE
Description: Deschedules the current process and starts the next task if a timeslice
is due and timeslicing is enabled. This instruction is implemented in two stages to
protect interrupt latency. The first stage deschedules the current process (even if the
queue is empty), adds it to the back of the scheduling queue and sets the
start_next_task status bit. The second stage clears the start_next_task status bit
and starts the next process from the scheduling queue. An interrupt may occur
between the two stages.
Definition:
if ( Status
{
if ( timeslice trap installed )
else
{
take timeslice trap
-- save state of current process
word [Tdesc @ pw.Iptr]
word [Tdesc @ pw.Wptr]
if (frontptr
{
}
Status
Status
Status
Status
Status
Status
Status
Status
Status
timeslicing enabled
-- add current process to scheduling queue
word [backptr @ pw.Link]
word [SchedulerQptr @ q.BPtrLoc]
-- remove front process from queue
word [SchedulerQptr @ q.FPtrLoc]
-- start next process from scheduling queue
Tdesc
Wptr
Iptr
local_interrupt_enable
overflow
undeflo w
carry
user_mode
interrupt_mode
trap_mode
sleep
start_next_task
NotProcess)
and Status
frontptr
word [frontptr @ pw.Wptr]
word [frontptr @ pw.Iptr]
timeslice_count
next instruction
Wptr
set
clear
clear
clear
set
clear
clear
clear
clear
--
queue not empty
=0 )
8 Instruction Set Reference
Tdesc
Tdesc
word[frontptr @ pw.Link]
timeslice
159/205

Related parts for ST20-C1