mach_port_allocate_full
Function - Create a port right with full Mach port semantics.
SYNOPSIS
kern_return_t mach_port_allocate_full
(ipc_space_t task,
mach_port_right_t right,
subsystem_t subsystem,
mach_port_qos_t qos,
task name);
PARAMETERS
- task
-
[in task send right] The task acquiring the port right.
- right
-
[in scalar] The kind of entity to be created. This is one of the following:
- MACH_PORT_RIGHT_RECEIVE
-
mach_port_allocate_full creates a port. The new port is not a member
of any port set. It doesn't have any extant send or send-once
rights. Its make-send count is zero, its sequence number is zero, its
queue limit is MACH_PORT_QLIMIT_DEFAULT, and it has no queued
messages. The name parameter
denotes the receive right for the new port.
The owning task does not hold send rights for the new port, only the receive
right. The mach_port_insert_right
and mach_port_extract_right interfaces can be used
to convert the receive right to a combined send/receive right.
- MACH_PORT_RIGHT_PORT_SET
-
mach_port_allocate_full creates a port set. The new port set
has no members.
- MACH_PORT_RIGHT_DEAD_NAME
-
mach_port_allocate_full creates a dead name. The new dead
name has one user reference.
- subsystem
-
[in scalar] The port right naming the subsystem the newly created port
is to be associated with.
- qos
-
[pointer to an in/out structure] Structure used to specify
the desired "quality of service." This structure may be used
to mandate the name of the returned port right and/or the port's "quality
of service" attribute. The current implementation recognizes two such
attributes: regular and realtime.
- name
-
[out scalar] The task's name for the port right. This can be any name
that wasn't in use.
DESCRIPTION
The mach_port_allocate_full function creates a new right in the
specified task. The new right's name is returned via the name parameter.
The new port supports the full set of Mach port semantics (i.e. no_more_senders
detection will work, if requested).
NOTES
This interface is machine word length specific because of the port
name parameter.
RETURN VALUES
- KERN_NO_SPACE
-
There was no room in task's IPC name space for another right.
RELATED INFORMATION
Functions:
mach_port_allocate,
mach_port_allocate_qos,
mach_port_allocate_name,
mach_port_deallocate,
mach_port_insert_right,
mach_port_extract_right.
Structures:
mach_port_qos.