package ti.sysbios.knl |
|
Contains core threading modules for the SYS/BIOS kernel
Many real-time applications must perform a number of functions at the
same time, often in response to external events such as the availability of
data or the presence of a control signal. Both the functions and
when
they are performed are important.
[
more ... ]
package ti.sysbios.knl [2, 0, 0, 0] {
// System Clock Manager
// Event Manager
// Idle Thread Manager
// Mailbox Manager
// Queue manager
// Semaphore Manager
// Software Interrupt Manager
// Task Manager
}
DETAILS
Many real-time applications must perform a number of functions at the
same time, often in response to external events such as the availability of
data or the presence of a control signal. Both the functions and when
they are performed are important.
Such functions are called "threads". Within SYS/BIOS, the term is defined
broadly to include any independent stream of instructions executed by the
processor. A thread is a single point of control that can activate a
function call or an interrupt service routine (ISR).
SYS/BIOS enables your applications to be structured as a collection of
threads. Multithreaded programs allow higher-priority threads to preempt
lower-priority threads and allow various types of interaction between
threads, including blocking, communication, and synchronization.
SYS/BIOS provides support for several types of threads with different
priorities. Each thread type has different execution and preemption
characteristics. The thread types (from highest to lowest priority) are:
The ti.sysbios.knl package also provides several modules for
synchronizing threads.
- Semaphores (ti.sysbios.knl.Semaphore) are often used to
coordinate access to a shared resource
among a set of competing tasks. Semaphores can be used for task
synchronization and mutual exclusion. Semaphore objects can be declared
as either counting or binary semaphores. The same APIs are used for
both counting and binary semaphores.
- Events (ti.sysbios.knl.Event) provide a means for
communicating between and synchronizing
threads. They are similar to Semaphores, except that they allow you
to specify multiple conditions ("events") that must occur before the
waiting thread returns.
- Mailboxes (ti.sysbios.knl.Mailbox) can be used to pass buffers
from one thread to another.
A Mailbox instance can be used by multiple readers and writers.
In addition to Semaphores, Events, and Mailboxes, you can use
Gates to prevent concurrent accesses to critical regions of code.
The
xdc.runtime.Gate module is provided by XDCtools, but
SYS/BIOS
provides some additional implementations in
ti.sysbios.gates.
generated on Sat, 19 Jan 2019 15:38:12 GMT