Skip navigation.

ATMI C Function Reference

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

 


tpgprio(3c)

Name

tpgprio()—Routine for getting a service request priority.

Synopsis

#include <atmi.h> 
int tpgprio(void)

Description

tpgprio() returns the priority for the last request sent or received by the current thread in its current context. Priorities can range from 1 to 100, inclusive, with 100 being the highest priority. tpgprio() may be called after tpcall() or tpacall(), (also tpenqueue(), or tpdequeue(), 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.

In a multithreaded application tpgprio() operates on a per-thread basis.

Because the conversation primitives are not associated with priorities, issuing tpsend() or tprecv() has no affect on the priority returned by tpgprio(). Also, there is no priority associated with a conversational service routine unless a tpcall() or tpacall() is done within that service.

In a multithreaded application, a thread in the TPINVALIDCONTEXT state is not allowed to issue a call to tpgprio().

Return Values

Upon success, tpgprio() returns a request's priority;

Upon failure, tpgprio() returns -1 and sets tperrno to indicate the error condition.

Errors

Upon failure, tpgprio() sets tperrno to one of the following values:

[TPENOENT]

tpgprio() was called and no requests (via tpcall() or tpacall()) have been sent, or it is called within a conversational service for which no requests have been sent.

[TPEPROTO]

tpgprio() was called improperly.

[TPESYSTEM]

A BEA Tuxedo system error has occurred. 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), tpservice(3c), tpsprio(3c)

 

Skip navigation bar  Back to Top Previous Next