The w_getipc service queries shared memory, messages, semaphores, and map service objects for the next or specified member to which the invoker has read access.
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1GET): | 31-bit |
AMODE (BPX4GET): | 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 BPX4GET with the same parameters. Buffer_address is a doubleword.
Specifies a token that corresponds to a message queue, shared memory segment, or semaphore member ID. Zero represents the first member ID. The token to be used in the next invocation is passed back in Return_value. Ipc_Token is ignored when Ipc_OVER is specified.
Specifies a message queue ID, semaphore ID, or shared member ID.
Address of the buffer structure defined by IPCQ. For the structure describing this buffer, see BPXYIPCQ — Map w_getipc structure.
Length of the structure defined by IPCQ. Set to IPCQ#LENGTH. Field IPCQLENGTH will differ from IPCQ#LENGTH when the system call is at a different level than the included IPCQ. An error will be returned if this length is less than 4. The buffer will be filled to the lesser of IPCQ#LENGTH or the value specified here.
Command | Description |
---|---|
Ipcq#ALL | Retrieve next shared memory, message and semaphore member. |
Ipcq#MSG | Retrieve next message member. |
Ipcq#SEM | Retrieve next semaphore member. |
Ipcq#SHM | Retrieve next shared memory member. |
Ipcq#OVER | Overview of system variables. Ignores the value of the first operand (Ipc_Token). |
Ipcq#MAP | Retrieve mapped memory objects. |
The name of a fullword in which the w_getipc service returns the next Ipc_Token (a negative number), 0, or -1 (error). If Ipc_Token is specified, 0 indicates end of file. If Ipc_Member_ID is specified, 0 indicates success.
Return_code | Explanation |
---|---|
EACCES | Operation permission (read) is denied to the calling process for the Ipc_Member_ID specified. The following reason code can accompany the return code: JRIpcDenied. |
EINVAL | The Ipc_Member_ID is not valid for the command specified:
The following reason codes can accompany the return code: JRBuffTooSmall, JRIpcBadID, or JRBadEntryCode. |
EFAULT | An input parameter specified an address that caused the callable service to program check. The following reason code can accompany the return code: JRBadAddress. |
The name of a fullword in which the w_getipc service stores the reason code. The w_getipc service returns Reason_code only if Return_value is -1. Reason_code further qualifies the Return_code value. See z/OS UNIX System Services Messages and Codes for the reason codes.
With Ipcq#MAP, the w_getipc service may, and likely will, return information about a particular map service object multiple times – once for each process that is using it. If the caller wishes to provide summary information, it is the caller's responsibility to associate the responses for the same map service object with each other. This can be done using the creator PID, because any one process can create only one object, and descendants of that process cannot create a map service object at all. Map service objects are inherited from the parent process.
There are no restrictions on the use of the w_getipc service.
For an example using this callable service, see BPX1GET (w_getipc) example.