Standards
Standards / Extensions |
C or C++ |
Dependencies |
|
both |
|
Format
#include <sys/_Elmarm4.h>
arm_error_t arm_bind_thread(
/* [in] */ arm_start_handle_t start_handle,
/* [in] */ arm_int32_t flags,
/* [in] */ arm_buffer4_t *buffer4,
);
General description
Use arm_bind_thread()
to indicate the current thread is performing processing on behalf
of a given transaction, and no other transaction. This enables eWLM
to collect resource usage and delay information for threads serving
each class of work, and to adjust the resources given to threads to
help them meet the goals assigned to those classes.
Any number
of threads can bind to the same transaction at the same time. However
a single thread cannot bind to more than one transaction at the same
time. If a thread calls arm_bind_thread() when it is already bound
to a transaction, the call is not honored and it returns a negative
value to indicate an error.
A thread that calls arm_bind_thread()
must call arm_unbind_thread() when it completes its processing on
behalf of the transaction. (If arm_unbind_thread() is not called,
then arm_stop_transaction() unbinds any threads that remain bound
to the transaction. This exists for recovery purposes. Applications
are expected to use arm_unbind_thread() as part of normal processing.)
- start_handle
- The handle returned by arm_start_transaction() for the transaction.
- flags
- Reserved for future use. The argument must be set to 0.
- buffer4
- A pointer to a buffer that identifies one or more sub-buffers
containing additional data. Currently no sub-buffers are defined for
this function so a null pointer should be passed. If a buffer is
passed eWLM ignores it.
Returned value
On success, arm_bind_thread
returns ARM_RC_SUCCESS. On failure, the errno and return code are
set to indicate the error. See
Return code for
the list of all possible return codes.
- Error Code
- Description
- EFAULT
- A parameter of this service contained an address that was not
accessible to the caller.
- EINVAL
- A parameter of this service contained a value that was not valid.
- EMVSARMERROR
- An ARM error occurred. Refer to the return code for the specific
error.
- EPERM
- The caller does not have the appropriate privileges. The return
code is set to ARM_RC_AUTH_ERROR.
- EMVSSAF2ERR
- An error occurred in the security product.
Return code
The following
list contains all possible return codes for the ARM function calls.
- Return Code
- Description
- ARM_RC_APP_INPUT
- User provided application id is invalid.
- ARM_RC_APPL_INST_MAX
- Maximum number of application instances per process is exceeded.
- ARM_RC_APPL_INST_NAME
- Application instance name is too long.
- ARM_RC_APPL_MAX
- Maximum number of registered applications is exceeded.
- ARM_RC_APPL_NAME
- Application name is missing or too long.
- ARM_RC_AUTH_ERROR
- User is not authorized to perform ARM calls.
- ARM_RC_BLOCKED_MAX
- Maximum number of blocked threads per transaction is exceeded.
- ARM_RC_CORR_BAD_SIZE
- Correlator size is not valid.
- ARM_RC_CORR_EFAULT
- Correlator return address is not valid.
- ARM_RC_ENOMEM
- Process or system is out of memory.
- ARM_RC_FLAGS_EINVAL
- Flags value is not valid.
- ARM_RC_GRP_MAX
- Maximum number of registered application groups is exceeded.
- ARM_RC_GRP_NAME
- Application group name is too long.
- ARM_RC_HANDLE_EFAULT
- Handle return address is not valid.
- ARM_RC_MAXMEM
- Maximum ARM services memory limit is exceeded.
- ARM_RC_PARENT_CORR_INVAL
- Parent correlator is not valid.
- ARM_RC_PARENT_CORR_SZ
- Parent correlator is too small.
- ARM_RC_PARENT_CORR_VERSION
- Parent correlator version is not correct.
- ARM_RC_PROC_VAL_MSMTCH
- Property values do not match property names.
- ARM_RC_PROP_NAME
- Transaction property name is too long.
- ARM_RC_PROP_NAME_MAX
- Too many property names are passed to ARM call.
- ARM_RC_PROP_NAME_SUBBUF_MAX
- Too many property name sub-buffers are passed to ARM call.
- ARM_RC_PROP_VAL
- Transaction property value is too long.
- ARM_RC_PROP_VAL_MAX
- Too many property values are passed to ARM call.
- ARM_RC_PROP_VAL_SUBBUF_MAX
- Too many property value sub-buffers are passed to ARM call.
- ARM_RC_TIME_SUBBUF_MAX
- Too many arrival time sub-buffers are passed to ARM call.
- ARM_RC_TRAN_INPUT
- User provided transaction type id is not valid.
- ARM_RC_TRAN_MAX
- Maximum number of transactions is exceeded.
- ARM_RC_TRAN_STATUS_EINVAL
- Invalid transaction status.
- ARM_RC_TRAN_TYPE_INST_MAX
- Maximum number of registered transaction type instances per process
is exceeded.
- ARM_RC_TRAN_TYPE_MAX
- Maximum number of registered transaction types is exceeded.
- ARM_RC_TRAN_TYPE_NAME
- Transaction type name is missing or too long.
- ARM_RC_UNKN_APPL_INST
- Application instance is not found.
- ARM_RC_UNKN_BLOCKED
- Blocked thread is not valid for the specified transaction.
- ARM_RC_UNKN_PARENT
- Parent transaction is not a valid transaction.
- ARM_RC_UNKN_PROC
- The calling processing did not register an application instance.
- ARM_RC_UNKN_TRAN
- Transaction was not found for the calling process.
- ARM_RC_UNKN_TRANCLASS_INST
- Transaction class instance is not found.
- ARM_RC_URI_NAME
- URI value is too long.
- ARM_RC_URI_SUBBUF_MAX
- Too many URI value sub-buffers are passed to ARM call.
- ARM_RC_VERSION_NAME
- Application version name is too long.