The pthread_tag_np service sets, queries, or both sets and queries the 65 bytes of thread tag data that is associated with the caller's thread.
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1PTT): | 31-bit |
AMODE (BPX4PTT): | 64-bit |
ASC mode: | Primary mode |
Interrupt status: | Enabled for interrupts |
Locks: | Unlocked |
Control parameters: | All parameters must be addressable by the caller and in the primary address space. |
|
AMODE 64 callers use BPX4PTT with the same parameters. All parameter addresses and addresses in parameter structures are doublewords.
The name of a fullword that contains either 0 or the length of the new tag data that is pointed to by New_Tag_Ptr. If New_Tag_Length contains 0 and New_Tag_Ptr contains a nonzero value, the caller's thread tag data is cleared. If New_Tag_Ptr contains a nonzero value, New_Tag_Length must be in the range of 0 to 65. See the usage notes for more details.
The name of a fullword (doubleword) that contains either 0 or the address of a location that contains the new thread tag data. If New_Tag_Ptr contains 0, the caller's thread tag data is left unchanged. See the usage notes for more details.
The name of a fullword in which the pthread_tag_np service returns the length of the old (current) thread tag data that is returned to the caller.
The name of a fullword (doubleword) that contains either 0 or the address of a 65-byte area in which the pthread_tag_np service returns the old (current) thread tag data. If Old_Tag_Ptr contains 0, no thread tag data is returned to the caller and Old_Tag_Length remains unchanged. See the usage notes for more details.
The name of a fullword in which the pthread_tag_np service returns 0 if the request is successful, or -1 if it is not successful.
Return_code | Explanation |
---|---|
EFAULT | One or more of the following conditions were detected:
The following reason codes can accompany the return code: JRNewLocationErr, or JROldLocationErr. |
EINVAL | New_Tag_Ptr was nonzero, but New_Tag_Length was not in the range of 0 to 65. The following reason code can accompany the return code: JRNewLenBad. |
The name of a fullword in which the pthread_tag_np service stores the reason code. The pthread_tag_np service returns Reason_code only if Return_value is -1. Reason_code further qualifies the Return_code value. For the reason codes, see z/OS UNIX System Services Messages and Codes.
None.
None.
For an example using this callable service, see BPX1PTT (pthread_tag_np) example.