The msgctl service provides a variety of message control operations as specified by the Command parameter. These functions include reading and changing message variables within the MSQID_DS data structure, and removing a message queue from the system.
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1QCT): | 31-bit |
AMODE (BPX4QCT): | 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 BPX4QCT with the same parameters. The Buffer parameter is a doubleword.
Specifies the message queue identifier.
The name of the fullword (doubleword) that contains the address of the buffer into which or from which the message queue information will be copied. This buffer is mapped by MSQID_DS. (See BPXYMSG — Map interprocess communication message queues.)
The name of a fullword in which the msgctl service returns -1 or 0.
Return_code | Explanation |
---|---|
EACCES | The command specified was Ipc_STAT, and the calling process does not have read permission. The following reason code can accompany the return code: JRIpcDenied. |
EINVAL | One of the following occurred:
|
EPERM | One of the following occurred:
|
EFAULT | The Buffer parameter specified an address that caused the syscall to program check. The following reason code can accompany the return code: JRBadAddress. |
The name of a fullword in which the msgctl service stores the reason code. The msgctl 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.
The invoker is restricted by ownership, read and read-write permissions defined by msgget and msgctl Ipc_SET.
For an example using this callable service, see BPX1QCT (msgctl) example.