tpgprio
-routine for getting a service request priority
#include <atmi.h>
int tpgprio(void)
tpgprio
() returns the priority for the last request sent or received. Priorities can range from 1 to 100, inclusive, with 100 being the highest priority. tpgprio
() may be called after tpcall
(3) or tpacall
(3), (also tpenqueue
(3), or tpdequeue
(3), assuming the queued management facility is installed), and the priority returned is for the request sent. Also, tpgprio
() may be called within a service routine to find out at what priority the invoked service was sent. tpgprio
() may be called any number of times and will return the same value until the next request is sent.
Since the conversation primitives are not associated with priorities, issuing tpsend
(3) or tprecv
(3) has no affect on the priority returned by tpgprio
(). Also, there is no priority associated with a conversational service routine unless a tpcall
(3) or tpacall
(3) is done within that service.
Upon success, tpgprio
() returns a request's priority; otherwise tpgprio
() returns \-1 on error and sets tperrno
to indicate the error condition.
Under the following conditions, tpgprio
() fails and sets tperrno
to:
TPENOENT
]
tpgprio
() was called and no requests (via tpcall
(3) or tpacall
(3)) have been sent, or it is called within a conversational service for which no requests have been sent.
TPEPROTO
]
tpgprio
() was called in an improper context.
TPESYSTEM
]
TPEOS
]
tpacall
(3), tpcall
(3), tpdequeue
(3), tpenqueue
(3), tpservice
(3), tpsprio
(3)