Skip navigation.

ATMI C Function Reference

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

 


tpsprio(3c)

Name

tpsprio()—Sets the service request priority.

Synopsis

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

Description

tpsprio() sets the priority for the next request sent or forwarded by the current thread in the current context. The priority set affects only the next request sent. Priority can also be set for messages enqueued or dequeued by tpenqueue() or tpdequeue(), 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() or tpsend().

A lower priority message does not remain enqueued forever because every tenth message is retrieved on a "first in, first out" (FIFO) basis. Response time should not be a concern of the lower priority interface or service.

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

The 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.

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

Return Values

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

Errors

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

[TPEINVAL]

flags are invalid.

[TPEPROTO]

tpsprio() 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), tpgprio(3c)

 

Skip navigation bar  Back to Top Previous Next