Next: Port Sets, Previous: Ports and other Tasks, Up: Port Manipulation Interface [Contents][Index]
The mach_port_seqno_t
data type is an unsigned int
which
contains the sequence number of a port.
The mach_port_mscount_t
data type is an unsigned int
which
contains the make-send count for a port.
The mach_port_msgcount_t
data type is an unsigned int
which
contains a number of messages.
The mach_port_rights_t
data type is an unsigned int
which
contains a number of rights for a port.
This structure contains some status information about a port, which can
be queried with mach_port_get_receive_status
. It has the following
members:
mach_port_t mps_pset
The containing port set.
mach_port_seqno_t mps_seqno
The sequence number.
mach_port_mscount_t mps_mscount
The make-send count.
mach_port_msgcount_t mps_qlimit
The maximum number of messages in the queue.
mach_port_msgcount_t mps_msgcount
The current number of messages in the queue.
mach_port_rights_t mps_sorights
The number of send-once rights that exist.
boolean_t mps_srights
TRUE
if send rights exist.
boolean_t mps_pdrequest
TRUE
if port-deleted notification is requested.
boolean_t mps_nsrequest
TRUE
if no-senders notification is requested.
The function mach_port_get_receive_status
returns the current
status of the specified receive right.
The function returns KERN_SUCCESS
if the call succeeded,
KERN_INVALID_TASK
if task was invalid,
KERN_INVALID_NAME
if name did not denote a right and
KERN_INVALID_RIGHT
if name denoted a right, but not a
receive right.
The mach_port_get_receive_status
call is actually an RPC to task,
normally a send right for a task port, but potentially any send right.
In addition to the normal diagnostic return codes from the call’s server
(normally the kernel), the call may return mach_msg
return codes.
The function mach_port_set_mscount
changes the make-send count of
task’s receive right named name to mscount. All
values for mscount are valid.
The function returns KERN_SUCCESS
if the call succeeded,
KERN_INVALID_TASK
if task was invalid,
KERN_INVALID_NAME
if name did not denote a right and
KERN_INVALID_RIGHT
if name denoted a right, but not a
receive right.
The mach_port_set_mscount
call is actually an RPC to task,
normally a send right for a task port, but potentially any send right.
In addition to the normal diagnostic return codes from the call’s server
(normally the kernel), the call may return mach_msg
return codes.
The function mach_port_set_qlimit
changes the queue limit
task’s receive right named name to qlimit. Valid
values for qlimit are between zero and
MACH_PORT_QLIMIT_MAX
, inclusive.
The function returns KERN_SUCCESS
if the call succeeded,
KERN_INVALID_TASK
if task was invalid,
KERN_INVALID_NAME
if name did not denote a right,
KERN_INVALID_RIGHT
if name denoted a right, but not a
receive right and KERN_INVALID_VALUE
if qlimit was invalid.
The mach_port_set_qlimit
call is actually an RPC to task,
normally a send right for a task port, but potentially any send right.
In addition to the normal diagnostic return codes from the call’s server
(normally the kernel), the call may return mach_msg
return codes.
The function mach_port_set_seqno
changes the sequence number
task’s receive right named name to seqno. All
sequence number values are valid. The next message received from the
port will be stamped with the specified sequence number.
The function returns KERN_SUCCESS
if the call succeeded,
KERN_INVALID_TASK
if task was invalid,
KERN_INVALID_NAME
if name did not denote a right and
KERN_INVALID_RIGHT
if name denoted a right, but not a
receive right.
The mach_port_set_seqno
call is actually an RPC to task,
normally a send right for a task port, but potentially any send right.
In addition to the normal diagnostic return codes from the call’s server
(normally the kernel), the call may return mach_msg
return codes.
The function mach_port_set_protected_payload
sets the protected
payload associated with the right name to payload.
Section Message Receive describes how setting a protected
payload affects the messages delivered to name.
The function returns KERN_SUCCESS
if the call succeeded,
KERN_INVALID_TASK
if task was invalid,
KERN_INVALID_NAME
if name did not denote a right and
KERN_INVALID_RIGHT
if name denoted a right, but not a
receive right.
The mach_port_set_protected_payload
call is actually an RPC to
task, normally a send right for a task port, but potentially any
send right. In addition to the normal diagnostic return codes from
the call’s server (normally the kernel), the call may return
mach_msg
return codes.
The function mach_port_clear_protected_payload
clears the
protected payload associated with the right name.
The function returns KERN_SUCCESS
if the call succeeded,
KERN_INVALID_TASK
if task was invalid,
KERN_INVALID_NAME
if name did not denote a right and
KERN_INVALID_RIGHT
if name denoted a right, but not a
receive right.
The mach_port_clear_protected_payload
call is actually an RPC
to task, normally a send right for a task port, but potentially
any send right. In addition to the normal diagnostic return codes
from the call’s server (normally the kernel), the call may return
mach_msg
return codes.
Next: Port Sets, Previous: Ports and other Tasks, Up: Port Manipulation Interface [Contents][Index]