home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3c / mq_receive.z / mq_receive
Encoding:
Text File  |  2002-10-03  |  5.1 KB  |  133 lines

  1.  
  2.  
  3.  
  4. mmmmqqqq____rrrreeeecccceeeeiiiivvvveeee((((3333cccc))))                                                  mmmmqqqq____rrrreeeecccceeeeiiiivvvveeee((((3333cccc))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _mmmm_qqqq______rrrr_eeee_cccc_eeee_iiii_vvvv_eeee - receive a message from a queue
  10.  
  11. CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_mmmm_qqqq_uuuu_eeee_uuuu_eeee_...._hhhh_>>>>
  13.  
  14.      _iiii_nnnn_tttt _mmmm_qqqq______rrrr_eeee_cccc_eeee_iiii_vvvv_eeee _((((_mmmm_qqqq_dddd______tttt _m_q_d_,,,, _cccc_hhhh_aaaa_rrrr _****_m_s_g_p_t_r_,,,, _ssss_iiii_zzzz_eeee______tttt _m_s_g_l_e_n_,,,, _uuuu_nnnn_ssss_iiii_gggg_nnnn_eeee_dddd _iiii_nnnn_tttt
  15.      _****_m_s_g_p_r_i_o_))))_;;;;
  16.  
  17. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      _mmmm_qqqq______rrrr_eeee_cccc_eeee_iiii_vvvv_eeee removes a message, of size _m_s_g_l_e_n bytes, from the message
  19.      queue named by the _m_q_d descriptor, and copies it to the buffer at address
  20.      _m_s_g_p_t_r.
  21.  
  22.      Messages are removed in priority order with higher priority messages
  23.      removed before the lower priority messages. The larger the numerical
  24.      value of the priority, the more important the message.  If the argument
  25.      _m_s_g_p_r_i_o is not NULL, the priority of the message removed is stored at
  26.      address _m_s_g_p_r_i_o.  Messages of equal priority are removed in FIFO order.
  27.  
  28.      If the OOOO____NNNNOOOONNNNBBBBLLLLOOOOCCCCKKKK flag is set for the _m_d_q message queue descriptor,
  29.      _mmmm_qqqq______rrrr_eeee_cccc_eeee_iiii_vvvv_eeee will not block when the queue is empty [see _mmmm_qqqq______ssss_eeee_tttt_aaaa_tttt_tttt_rrrr(3c)].
  30.      Otherwise, _mmmm_qqqq______rrrr_eeee_cccc_eeee_iiii_vvvv_eeee will block until either a message is present in the
  31.      queue, or _mmmm_qqqq______rrrr_eeee_cccc_eeee_iiii_vvvv_eeee is interrupted by a signal.
  32.  
  33.      If multiple processes are waiting to receive a message from the queue,
  34.      the highest priority process will receive the message when it is
  35.      delivered.  Processes with equal priorities, blocked waiting for
  36.      messages, are unblocked in FIFO order when messages arrive.
  37.  
  38.      _mmmm_qqqq______rrrr_eeee_cccc_eeee_iiii_vvvv_eeee will fail if one or more of the following conditions are true:
  39.  
  40.      [EAGAIN]       The OOOO____NNNNOOOONNNNBBBBLLLLOOOOCCCCKKKK flag is set for the _m_q_d queue descriptor
  41.                     and the queue is empty.
  42.  
  43.      [EBADF]        The message queue descriptor, _m_q_d, is not valid or the
  44.                     queue was not opened for reading.
  45.  
  46.      [EINTR]        The _mmmm_qqqq______rrrr_eeee_cccc_eeee_iiii_vvvv_eeee system call was interrupted by a signal.
  47.  
  48.      [EMSGSIZE]     The size of the buffer, _m_s_g_l_e_n, is less than the value of
  49.                     the _m_q__m_a_x_s_i_z_e attribute of the queue.
  50.  
  51. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  52.      _mmmm_qqqq______oooo_pppp_eeee_nnnn(3c), _iiii_nnnn_tttt_rrrr_oooo(3c), _mmmm_qqqq______uuuu_nnnn_llll_iiii_nnnn_kkkk(3c), _mmmm_qqqq______ssss_eeee_nnnn_dddd(3c), _mmmm_qqqq______gggg_eeee_tttt_aaaa_tttt_tttt_rrrr(3c),
  53.      _mmmm_qqqq______nnnn_oooo_tttt_iiii_ffff_yyyy(3c)
  54.  
  55. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  56.      Upon successful completion, _m_q__r_e_c_e_i_v_e returns the number of bytes in the
  57.      message received, with the message copied to the buffer pointed to by
  58.      _m_s_g_p_t_r and the priority of the message stored in the location pointed to
  59.      by _m_s_g_p_r_i_o.  Otherwise, no message is removed from the queue and a value
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. mmmmqqqq____rrrreeeecccceeeeiiiivvvveeee((((3333cccc))))                                                  mmmmqqqq____rrrreeeecccceeeeiiiivvvveeee((((3333cccc))))
  71.  
  72.  
  73.  
  74.      of -1 is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to indicate the error.
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.