Back to index

glibc  2.9
Functions
msg.c File Reference
#include <mach/port.h>
#include <mach/message.h>

Go to the source code of this file.

Functions

mach_msg_return_t __mach_msg (mach_msg_header_t *msg, mach_msg_option_t option, mach_msg_size_t send_size, mach_msg_size_t rcv_size, mach_port_t rcv_name, mach_msg_timeout_t timeout, mach_port_t notify)
 weak_alias (__mach_msg, mach_msg)
 weak_alias (__mach_msg_send, mach_msg_send)

Function Documentation

mach_msg_return_t __mach_msg ( mach_msg_header_t *  msg,
mach_msg_option_t  option,
mach_msg_size_t  send_size,
mach_msg_size_t  rcv_size,
mach_port_t  rcv_name,
mach_msg_timeout_t  timeout,
mach_port_t  notify 
)

Definition at line 93 of file msg.c.

{
  mach_msg_return_t ret;

  /* Consider the following cases:
     1. Errors in pseudo-receive (eg, MACH_SEND_INTERRUPTED
     plus special bits).
     2. Use of MACH_SEND_INTERRUPT/MACH_RCV_INTERRUPT options.
     3. RPC calls with interruptions in one/both halves.
     */

  ret = __mach_msg_trap (msg, option, send_size,
                      rcv_size, rcv_name, timeout, notify);
  if (ret == MACH_MSG_SUCCESS)
    return MACH_MSG_SUCCESS;

  if (!(option & MACH_SEND_INTERRUPT))
    while (ret == MACH_SEND_INTERRUPTED)
      ret = __mach_msg_trap (msg, option, send_size,
                          rcv_size, rcv_name, timeout, notify);

  if (!(option & MACH_RCV_INTERRUPT))
    while (ret == MACH_RCV_INTERRUPTED)
      ret = __mach_msg_trap (msg, option & ~MACH_SEND_MSG,
                          0, rcv_size, rcv_name, timeout, notify);

  return ret;
}

Here is the caller graph for this function:

weak_alias ( __mach_msg  ,
mach_msg   
)

Definition at line 127 of file msg.c.

{
  return __mach_msg (msg, MACH_SEND_MSG,
                   msg->msgh_size, 0, MACH_PORT_NULL,
                   MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
}

Here is the call graph for this function:

weak_alias ( __mach_msg_send  ,
mach_msg_send   
)

Definition at line 136 of file msg.c.

{
  return __mach_msg (msg, MACH_RCV_MSG,
                   0, msg->msgh_size, msg->msgh_local_port,
                   MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
}

Here is the call graph for this function: