Q_MAKE
Make A System Queue
Entry Parameters:
Register CL: 086H (134)
DX: QD
Address - Offset
DS: QD
Address - Segment
QD filled
in
Returned Values:
Register AX: 0 on success, 0FFFFH on
failure
BX: Same as
AX
CX: Error Code
Q_MAKE creates a system queue for the calling process by passing the address of a Queue
Descriptor (QD). Figure 6-16 shows the Queue Descriptor format, and Table 6-22 lists the
QD field elements.
Field |
Offset | Size | Definition |
||||||||||||||||||
| 0 | Word | For Internal use must be initialized to 0 | |||||||||||||||||||
| 2 | Word | For Internal use must be initialized to 0 | |||||||||||||||||||
| FLAGS | 4 | Word | Queue
Flags The bits are defined as follows:
All remaining flags reserved for future use |
||||||||||||||||||
| NAME | 6 | 8 Bytes | 8-byte queue name. All 8 bits of each character are matched on an Q_OPEN call. |
||||||||||||||||||
| MSGLEN | 14 | Word | Number of bytes in each logical message. | ||||||||||||||||||
| NMSGS | 16 | Word | Maximum number of logical messages to be supported. If the number of messages written to the queue equals this maximum, no more messages are allowed until a message is read. | ||||||||||||||||||
| 18 | Word | For Internal use must be initialized to 0 | |||||||||||||||||||
| 20 | Word | For Internal use must be initialized to 0 | |||||||||||||||||||
| BUFFER | 22 | Word | Address of the queue buffer. This buffer must be (NMSGS * MSGLEN) bytes long. The address is an offset relative to the DS register. This field is unused if the QD resides outside of the System Data Segment. Typically this field is 0 if the queue is being created by a transient program. RSPs that create queues must initialize this field to point to a buffer. The Data Segment of an RSP's queue is considered part of the System Data Segment unless it is beyond 64k of the beginning of the System Data Segment. If BUFFER contains 0FFFFH, Q_MAKE allocates space for the Queue Descriptor and Queue Buffer from the system queue buffer area in the System Data Segment (SYSDAT). |
Every system queue is associated with a Queue Descriptor that resides in Concurrent's
System Data Segment. If the Queue Descriptor is within the System Data Segment, Concurrent
uses it directly for the System Queue. If the Queue Descriptor is outside the System Data
Segment, Concurrent obtains a Queue Descriptor from an internal Queue Descriptor table. If
there are no unused Queue Descriptors in the internal table, Q_MAKE returns an error code.
The buffer for a system queue must also reside within the System Data area. For non-00H
length buffers, resident buffers are used directly. Concurrent obtains a buffer from the
Queue Buffer Area if the buffer does not reside within the System Data Segment. The size
of the buffer is calculated from the NMSGS and MSGLEN fields. Q_MAKE returns an error code
if there is not enough unused buffer area left to accommodate this new buffer.
All system queues must have unique names. Q_MAKE returns an error code if a system queue
already exists by the given name.
Under Concurrent, all system queues must be explicitly opened (see Q_OPEN)
before being used to read or write messages or to delete the queue.
Error codes returned in CX.