PURPOSE

tpsprio - routine for setting service request priority

SYNOPSIS

#include <atmi.h>
int tpsprio(prio, flags)			

DESCRIPTION

tpsprio() sets the priority for the next request sent or forwarded. The priority set affects only the next request sent. (Priority can also be set for messages enqueued or dequeued by tpenqueue(3c) or tpdequeue(3c) if the queued message facility is installed.) By default, the setting of prio increments or decrements a service's default priority up to a maximum of 100 or down to a minimum of 1 depending on its sign, where 100 is the highest priority. The default priority for a request is determined by the service to which the request is being sent. This default may be specified administratively (see ubbconfig(5)), or take the system default of 50. tpsprio() has no effect on messages sent via tpconnect(3c) or tpsend(3c).

Following is a list of valid flags.

TPABSOLUTE
The priority of the next request should be sent out at the absolute value of prio. The absolute value of prio must be within the range 1 and 100, inclusive, with 100 being the highest priority. Any value outside of this range causes a default value to be used.

RETURN VALUES

tpsprio() returns -1 on error and sets tperrno to indicate the error condition.

ERRORS

Under the following conditions, tpsprio() fails and sets tperrno to:

[TPEINVAL]
flags are invalid.
[TPEPROTO]
tpsprio() was called in an improper context.
[TPESYSTEM]
The exact nature of the error is written to a log file.
[TPEOS]
An operating system error has occurred.

SEE ALSO

tpacall(3c),
tpcall(3c),
tpdequeue(3c),
tpenqueue(3c),
tpgprio(3c)