bytes are retrieved. In this case, the remainder of the message is left
on the stream head read queue and a non-zero return value is provided, as
described below under DIAGNOSTICS.
By default, _gggg_eeee_tttt_mmmm_ssss_gggg processes the first available message on the stream
head read queue. However, a user may choose to retrieve only high
priority messages by setting the integer pointed by _f_l_a_g_s_p to _RRRR_SSSS______HHHH_IIII_PPPP_RRRR_IIII.
In this case, _gggg_eeee_tttt_mmmm_ssss_gggg processes the next message only if it is a high
priority message. If the integer pointed by _f_l_a_g_s_p is 0, _gggg_eeee_tttt_mmmm_ssss_gggg
retrieves any message available on the stream head read queue. In this
case, on return, the integer pointed to by _f_l_a_g_s_p will be set to _RRRR_SSSS______HHHH_IIII_PPPP_RRRR_IIII
if a high priority message was retrieved, or 0 otherwise.
For _gggg_eeee_tttt_pppp_mmmm_ssss_gggg, the flags are different. _f_l_a_g_s_p points to a bitmask with
the following mutually-exclusive flags defined: _MMMM_SSSS_GGGG______HHHH_IIII_PPPP_RRRR_IIII_,,,, _MMMM_SSSS_GGGG______BBBB_AAAA_NNNN_DDDD, and
_MMMM_SSSS_GGGG______AAAA_NNNN_YYYY. Like _gggg_eeee_tttt_mmmm_ssss_gggg, _gggg_eeee_tttt_pppp_mmmm_ssss_gggg processes the first available message on
the stream head read queue. A user may choose to retrieve only high-
priority messages by setting the integer pointed to by _f_l_a_g_s_p to
_MMMM_SSSS_GGGG______HHHH_IIII_PPPP_RRRR_IIII and the integer pointed to by _b_a_n_d_p to 0. In this case,
_gggg_eeee_tttt_pppp_mmmm_ssss_gggg will only process the next message if it is a high-priority
message. In a similar manner, a user may choose to retrieve a message
from a particular priority band by setting the integer pointed to by
_f_l_a_g_s_p to _MMMM_SSSS_GGGG______BBBB_AAAA_NNNN_DDDD and the integer pointed to by _b_a_n_d_p to the priority
band of interest. In this case, _gggg_eeee_tttt_pppp_mmmm_ssss_gggg will only process the next
message if it is in a priority band equal to, or greater than, the
integer pointed to by _b_a_n_d_p, or if it is a high-priority message. If a
user just wants to get the first message off the queue, the integer
pointed to by _f_l_a_g_s_p should be set to _MMMM_SSSS_GGGG______AAAA_NNNN_YYYY and the integer pointed to
by _b_a_n_d_p should be set to 0. On return, if the message retrieved was a
high-priority message, the integer pointed to by _f_l_a_g_s_p will be set to
_MMMM_SSSS_GGGG______HHHH_IIII_PPPP_RRRR_IIII and the integer pointed to by _b_a_n_d_p will be set to 0.
Otherwise, the integer pointed to by _f_l_a_g_s_p will be set to _MMMM_SSSS_GGGG______BBBB_AAAA_NNNN_DDDD and
the integer pointed to by _b_a_n_d_p will be set to the priority band of the
message.
If _OOOO______NNNN_DDDD_EEEE_LLLL_AAAA_YYYY and _OOOO______NNNN_OOOO_NNNN_BBBB_LLLL_OOOO_CCCC_KKKK are clear, _gggg_eeee_tttt_mmmm_ssss_gggg blocks until a message of
the type specified by _f_l_a_g_s_p is available on the stream head read queue.
If _OOOO______NNNN_DDDD_EEEE_LLLL_AAAA_YYYY or _OOOO______NNNN_OOOO_NNNN_BBBB_LLLL_OOOO_CCCC_KKKK has been set and a message of the specified
type is not present on the read queue, _gggg_eeee_tttt_mmmm_ssss_gggg fails and sets _eeee_rrrr_rrrr_nnnn_oooo to
_EEEE_AAAA_GGGG_AAAA_IIII_NNNN.
If a hangup occurs on the stream from which messages are to be retrieved,
_gggg_eeee_tttt_mmmm_ssss_gggg continues to operate normally, as described above, until the
stream head read queue is empty. Thereafter, it returns 0 in the _llll_eeee_nnnn
fields of _c_t_l_p_t_r and _d_a_t_a_p_t_r.
_gggg_eeee_tttt_mmmm_ssss_gggg or _gggg_eeee_tttt_pppp_mmmm_ssss_gggg will fail if one or more of the following are true:
_EEEE_AAAA_GGGG_AAAA_IIII_NNNN The _OOOO______NNNN_DDDD_EEEE_LLLL_AAAA_YYYY or _OOOO______NNNN_OOOO_NNNN_BBBB_LLLL_OOOO_CCCC_KKKK flag is set, and no messages