99 lines
3.6 KiB
Groff
99 lines
3.6 KiB
Groff
'\"macro stdmacro
|
|
.TH "Frame Scheduler" 3
|
|
.SH NAME
|
|
\f4frs_enqueue\f1, \f4frs_pthread_enqueue\f1 \- enqueue a process/thread on a frame scheduler minor queue
|
|
.SH SYNOPSIS
|
|
\f4#include <sys/frs.h>\f1
|
|
.br
|
|
\f4#include <pthread.h>\f1
|
|
.P
|
|
\f4int frs_enqueue (frs_t\(** \f2frs\fP, pid_t \f2pid\fP, int \f2minor_frame\fP, unsigned int \f2discipline\fP);\f1
|
|
.P
|
|
\f4int frs_pthread_enqueue (frs_t\(** \f2frs\fP, pthread_t \f2pthread\fP, int \f2minor_frame\fP, unsigned int \f2discipline\fP);\f1
|
|
.fi
|
|
.SH DESCRIPTION
|
|
\f4frs_enqueue\fP enqueues the specified process \f2pid\fP on the
|
|
\f2minor_frame\fP of frame scheduler object \f2frs\fP.
|
|
.P
|
|
\f4frs_pthread_enqueue\fP enqueues the specified \f2pthread\fP on the
|
|
\f2minor_frame\fP of frame scheduler object \f2frs\fP.
|
|
.P
|
|
The scheduling \f2discipline\fP may be one or a combination of the following:
|
|
.P
|
|
.TP 5
|
|
\f4FRS_DISC_RT\fP
|
|
This is the most stringet real-time frame scheduler discipline.
|
|
When selected, the activity thread (\f2pthread\fP) or process (\f2pid\fP)
|
|
must start, execute, and call \f4frs_yield\fP(3) during the \f2minor_frame\fP.
|
|
.TP
|
|
\f4FRS_DISC_OVERRUNNABLE\fP
|
|
When selected, the target activity (\f2pthread\fP) or process (\f2pid\fP)
|
|
is started and executed during the \f2minor_frame\fP, but it is allowed to
|
|
overrun the frame boundary, not having to call \f4frs_yield\fP(3).
|
|
Once the \f2minor_frame\fP boundary ends the thread/process is preempted
|
|
and is not rescheduled until it's alloted time in the next minor frame.
|
|
.TP
|
|
\f4FRS_DISC_UNDERUNNABLE\fP
|
|
When selected, the target activity (\f2pthread\fP) or process (\f2pid\fP)
|
|
is not required to start or execute in the \f2minor_frame\fP. However, if it
|
|
is started it is required to call \f4frs_yield\fP(3) before the end of the frame.
|
|
.TP
|
|
\f4FRS_DISC_CONT\fP
|
|
When selected, the target activity (\f2pthread\fP) or process (\f2pid\fP)
|
|
need not run or yield in the next minor frame if it calls \f4frs_yield\fP(3)
|
|
in the specified \f2minor_frame\fP. This continuable discipline is ORed
|
|
with other disciplines in order to let a thread/process execute just once in
|
|
a block of consecutive minor frames.
|
|
.TP
|
|
\f4FRS_DISC_BACKGROUND\fP
|
|
When selected, the target activity (\f2pthread\fP) or process (\f2pid\fP)
|
|
is dipatched when all other processes queued in the \f2minor_frame\fP have
|
|
executed and yielded. Since background threads/processes cannot be sure they
|
|
will run and cannot predict how much time they will have, the concepts of
|
|
overrun and underrun do not apply to it.
|
|
.P
|
|
All enqueued activity threads/processes of participating frame schedulers
|
|
must join their \f2frs\fP via a call to \f4frs_join\fP(3) before frame rate
|
|
scheduling can commence.
|
|
.P
|
|
Frame scheduler enqueue operations will fail if one or more of the following
|
|
conditions are true:
|
|
.TP 15
|
|
.SM
|
|
\%[EINVAL]
|
|
Invalid frame scheduler object or minor frame.
|
|
.TP 15
|
|
.SM
|
|
\%[EPERM]
|
|
No permission to execute frame scheduler functions.
|
|
.TP 15
|
|
.SM
|
|
\%[EPERM]
|
|
The target \f2pthread\fP is not system scope.
|
|
.TP 15
|
|
.SM
|
|
\%[ENODEV]
|
|
The REACT/Pro Frame Scheduler Subsystem has not been installed.
|
|
.TP 15
|
|
.SM
|
|
\%[ENOPROC]
|
|
The specified target thread/process does not exist.
|
|
.SH "DIAGNOSTICS"
|
|
Upon successful completion, \f4frs_enqueue\fP and \f4frs_pthread_enqueue\fP
|
|
will return 0.
|
|
Otherwise, -1 is returned and errno is set to indicate the error.
|
|
.SH "SEE ALSO"
|
|
\f4frs_create\f1(3),
|
|
\f4frs_create_master\f1(3),
|
|
\f4frs_create_slave\f1(3),
|
|
\f4frs_pinsert\f1(3),
|
|
\f4frs_pthread_insert\f1(3),
|
|
\f4frs_premove\f1(3),
|
|
\f4frs_pthread_premove\f1(3)
|
|
.P
|
|
The REACT Real-Time Programmer's Guide (insight(1)) covers Frame Scheduler
|
|
principles and usage in detail.
|
|
.P
|
|
Frame scheduler programming examples (if installed) can be found in the
|
|
following directory: /usr/share/src/react/examples.
|