CEEOPGS
C library interface: pthread_getspecific()
CEEOPGS obtains the thread-specific value associated with a key that was obtained from a previous call to CEEOPKC. Different threads can have different values bound to the same key.
When successful, CEEOPGS stores the value currently bound to the specified key to the storage location referred to by the storage location which is in turn referred to by value. Language Environment manages the storage associated with the key/value bindings.
Syntax
void CEEOPGS (key, value,
[fc])
CEE_THDKEY *key;
POINTER *value;
FEED_BACK *fc;
- CEEOPGS
- Call this CWI interface as follows:
L R15,CEECAALEOV-CEECAA(,R12) CAA address is in R12 L R15,0096(,R15) BALR R14,R15
- key (input)
- The identifier for which the value is to be obtained. The key is generated by a previous call to CEEOPKC.
- value (output)
- The address of the address of the location to store the value currently associated with the key identifier. The value binding for the key is specific to the thread. The value typically is the address of a storage area to be unallocated during thread termination by the destructor function.
- fc (output/optional)
- The feedback code returned by the service. It indicates the degree of success in creating the new key.
The following message identifiers and associated severities can be returned by the service in the feedback code fc.
Condition | Description category | Description value |
---|---|---|
CEE000 | Severity | 0 |
Msg_No | 0000 | |
Message | The service completed successfully. | |
CEE4S9 | Severity | 3 |
Msg_No | 5001 | |
Message | POSIX services not available. | |
CEE5CQ | Severity | 3 |
Msg_No | 5530 | |
Message | The key value is not valid. That is, the key identifier is not one of the keys previously defined by CEEOPKC. | |
CEE5CS | Severity | 3 |
Msg_No | 5532 | |
Message | Thread termination is in progress. This operation is not allowed. A key get operation is not permitted during thread termination. | |
CEE5CT | Severity | 3 |
Msg_No | 5533 | |
Message | Program interrupt referring to user parameters. |
Usage Notes:
- Different threads can bind different values to the same key.
- This function cannot be called during thread termination.