|
|
tpgetctxt(3c)
Name
tpgetctxt() - retrieve a context identifier for the current application association
Synopsis
#include <atmi.h>
int tpgetctxt(TPCONTEXT_T *context, long flags)
Description
tpgetctxt() retrieves an identifier that represents the current application context and places that identifier in context. This function operates on a per-thread basis in a multithreaded environment, and on a per-process basis in a non-threaded environment.
Typically, a thread
The second argument, flags, is not currently used and must be set to 0.
tpgetctxt() may be called in single-context applications as well as in multicontext applications.
A thread in a multithreaded application may issue a call to tpgetctxt() while running in any context state, including TPINVALIDCONTEXT.
Return Values
Upon successful completion, tpgetctxt() returns a non-negative value. Context is set to the current context ID, which may be represented by any of the following:
A thread in the TPINVALIDCONTEXT state is prohibited from issuing calls to most ATMI functions. For a complete list of functions that may and may not be called, see Introduction to the C Language Application-Transaction Monitor Interface. For details about the TPINVALIDCONTEXT context state, see tpterm(3c).
Upon failure, tpgetctxt() returns a value of -1 and sets tperrno to indicate the error condition.
Errors
Upon failure, tpgetctxt() sets tperrno to one of the following values.
See Also
Introduction to the C Language Application-Transaction Monitor Interface, tpsetctxt(3c), tpterm(3c)
|
Copyright © 2000 BEA Systems, Inc. All rights reserved.
|