ST20-C1 STMICROELECTRONICS [STMicroelectronics], ST20-C1 Datasheet - Page 85
ST20-C1
Manufacturer Part Number
ST20-C1
Description
Instruction Set Reference Manual
Manufacturer
STMICROELECTRONICS [STMicroelectronics]
Datasheet
1.ST20-C1.pdf
(205 pages)
- Current page: 85 of 205
- Download datasheet (842Kb)
7.9.1
A process requesting a resource executes a wait (or P), which is the following code
sequence:
The wait instruction is executed, with a pointer to the semaphore control block in
Areg. The action of wait depends on the count in the semaphore control block. If the
count is not zero, then a resource is free, so the count of free resources is decre-
mented and the value false is left in the Areg to indicate that the process can
continue. If the count is zero then there are no free resources, and the process is
added to the list of waiting processes, and the value true is left in Areg to indicate that
the process must wait. A conditional jump then tests Areg and performs a stop if the
process must wait. stop saves the Iptr and Wptr and deschedules the process, which
will wait on the semaphore queue until another process performs a signal and subse-
quently restarts the process with a run instruction.
7.9.2
When a process finishes with a resource and can free it, it performs a signal (or V),
which is the following code sequence:
The signal instruction is executed, with a pointer to the semaphore control block in
Areg. The action of signal depends on whether a process is waiting or not. If the front
pointer of the process waiting list is empty then there are no processes waiting, so the
count is incremented and Areg is set to false . Otherwise, at least one process is
waiting, so the first process is remo ved from the list and placed in the Breg, and Areg
is set to true . A conditional jump tests Areg and performs a run to restart the process
if there was one waiting.
7.10 Sleep
When the ST20-C1 becomes idle it disables counter distribution to its circuits and
consumes a very small amount of electrical power; this is known as sleep mode. The
counters are re-enabled and normal operation resumes automatically and instantly
when either an interrupt or a software reset from the diagnostic controller is received.
Sleep mode may also be triggered directly from software by setting the sleep bit in the
status register:
In this case also, sleep mode persists until the next interrupt or software reset.
Waiting for a resource
CONTINUE:
Freeing a resource
CONTINUE:
ldc sleep; bitmask; statusset;
ld semaphore; wait;
cj CONTINUE;
stop;
ld semaphore; signal;
cj CONTINUE;
run;
7 Multi-tasking
85/205
Related parts for ST20-C1
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
ST20 software development and debugging tools
Manufacturer:
STMICROELECTRONICS [STMicroelectronics]
Datasheet:
Part Number:
Description:
C++ preprocessor for ST20 and T4/T8 transputers
Manufacturer:
STMICROELECTRONICS [STMicroelectronics]
Datasheet:
Part Number:
Description:
PC PARALLEL PORT TO JTAG INTERFACE
Manufacturer:
STMICROELECTRONICS [STMicroelectronics]
Datasheet:
Part Number:
Description:
PC PARALLEL PORT TO OS-LINK INTERFACE
Manufacturer:
STMICROELECTRONICS [STMicroelectronics]
Datasheet:
Part Number:
Description:
Gps Processor
Manufacturer:
STMicroelectronics
Datasheet:
Part Number:
Description:
Gps Processor
Manufacturer:
STMicroelectronics
Datasheet:
Part Number:
Description:
THYRISTORS
Manufacturer:
ST Microelectronics
Datasheet:
Part Number:
Description:
ADJUSTABLE INVERTING NEGATIVE OUTPUT CURRENT MODE PWM REGULATORS
Manufacturer:
ST Microelectronics
Datasheet:
Part Number:
Description:
0.25A SCRs
Manufacturer:
ST Microelectronics
Datasheet:
Part Number:
Description:
0.8A SCRs
Manufacturer:
ST Microelectronics
Datasheet:
Part Number:
Description:
Smartcard MCU With 4 additional I/0
Manufacturer:
ST Microelectronics
Datasheet:
Part Number:
Description:
SERIAL 2K (256 x 8) EEPROM
Manufacturer:
ST Microelectronics
Datasheet:
Part Number:
Description:
Search -----> STP10NB50FP
Manufacturer:
ST Microelectronics
Datasheet:
Part Number:
Description:
Search ---> STP12NB30
Manufacturer:
ST Microelectronics
Datasheet:
Part Number:
Description:
Search -----> STP13NK50Z
Manufacturer:
ST Microelectronics
Datasheet: