mach_rpc_trap


System Trap - Real-Time RPC trap.

SYNOPSIS

#include<mach/rpc.h>

mach_rpc_return_t   mach_rpc_trap
                     (mach_port_t                    dest_port,
                      mach_rpc_id_t                routine_num,
                      mach_rpc_signature_t       signature_ptr,
                      mach_rpc_size_t           signature_size);

PARAMETERS

dest_port
[in send right] The port representing the destination of the RPC (usually a registered subsystem established by a call to mach_port_allocate_subsystem).

routine_num
[in scalar] Identifier of the server work function.

signature_ptr
[in pointer] Pointer to the call's mach_rpc_signature structure.

signature_size
[in scalar] Size, in bytes, of the call's mach_rpc_signature structure.

DESCRIPTION

The mach_rpc_trap system trap is the entry point for the invoke side of the Mach RPC service used to transfer control to an RPC server. The trap is accessed via the MIG generated MACH_RPC macro which is invoked transparently when the mach_rpc feature is enabled. This function is not designed for use directly by the user. It is automatically generated by MIG to handle a function call.

For a complete description of this functionality, refer to: Burke, Edward, Michael Condict, David Mitchell, Franklin Reynolds, Peter Watkins, William Willcox, "RPC Design for Real-Time Mach," OSF Research Institute, Cambridge, MA.

NOTES

This interface is experimental and therefore subject to change.

RETURN VALUES

KERN_FAILURE
Either the argument copyin failed, there were too many arguments, or the argument copyout failed.

KERN_INVALID_ARGUMENT
The dest_port, signature_ptr, and/or the subsystem associated with the dest_port is invalid; the siganture_size is less than, or equal to, zero.

KERN_NO_ACCESS
The kernel port associated with the dest_port name is a norma proxy port.

KERN_RESOURCE_SHORTAGE
The kernel could not allocate storage for an internal rpc state structure.

RELATED INFORMATION

Functions: mach_rpc_return_trap, thread_activation_create, mach_port_allocate_subsystem, mach_subsystem_create.