lrt_tpsprio

Communication Functions

Sets the priority of the next request sent or forwarded.

int lrt_tpsprio( int prio, long flags );

prio Priority to set.
flags Valid flag: TPABSOLUTE - the priority of the next request should be sent at the absolute value of prio (valid values between 1 and 100).

Thelrt_tpsprio function sets the priority of the next request sent or forwarded.

Return Values

If the function fails, it returns -1 and sets tperrno to indicate the error condition.

Parameterization

You cannot use standard parameterization for any arguments in this function.

Example

Copy code
In the following example, lrt_tpsprio doubles the service request priority if the priority was less than or equal to 50.
int prio;
prio = lrt_tpgprio();
if (prio <= 50)
lrt_tpsprio(2 * prio, TPABSOLUTE);