'\"macro stdmacro .TH "Frame Scheduler" 3 .SH NAME \f4frs_pinsert\f1, \f4frs_pthread_insert\f1 \- insert a process/thread in a frame scheduler minor frame queue .SH SYNOPSIS \f4#include \f1 .br \f4#include \f1 .P \f4int frs_pinsert(frs_t* \f2frs\fP, int \f2minor_frame\fP, pid_t \f2target_pid\fP, int \f2discipline\fP, pid_t \f2base_pid\fP);\f1 .P \f4int frs_pthread_insert(frs_t* \f2frs\fP, int \f2minor_index\fP, pthread_t \f2target_pthread\fP, int \f2discipline\fP, pthread_t \f2base_pthread\fP);\f1 .fi .SH DESCRIPTION \f4frs_pinsert\fP inserts the \f2target_pid\fP process after the specified \f2base_pid\fP process in the \f2minor_frame\fP queue of \f2frs\fP. .P \f4frs_pthread_insert\fP inserts the \f2target_pthread\fP after the specified \f2base_pthread\fP in the \f2minor_frame\fP queue of \f2frs\fP. .P The frame scheduler queue insertion operations will fail if one or more of the following conditions are true: .TP 15 .SM \%[EINVAL] Invalid frame scheduler object. .TP 15 .SM \%[EPERM] No permission to execute frame scheduler functions. .TP 15 .SM \%[EPERM] The \f2target_pthread\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 base thread/process in not queued in the minor frame. .TP 15 .SM \%[ENOPROC] The specified target thread/process does not exist. .SH "DIAGNOSTICS" Upon successful completion, \f4frs_pinsert\fP and \f4frs_pthread_insert\fP will return 0. Otherwise, -1 is returned and errno is set to indicate the error. .SH "SEE ALSO" \f4frs_enqueue\f1(3), \f4frs_pthread_enqueue\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.