mach_port_allocate_subsystem


Function - Create a port right associated with the caller-specified subsystem.

SYNOPSIS

kern_return_t   mach_port_allocate_subsystem
                (ipc_space_t                               task,
                 subsystem_t                             subsys,
                 mach_port_name_t              mach_port_name_t);

PARAMETERS

task
[in task send right] The task acquiring the port right.

subsys
[in scalar] The port right naming the subsystem the newly created port is to be associated with.

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_subsystem function creates a new right and associates it with the specifed subsystem (specified via the subsys parameter) previously registered via a call to the mach_subsystem_create interface. The new right's name is returned in the name parameter. The association of this port with the subsystem is immutable for the life of the port.

Any RPC targeted at the new port will cause the kernel glue-code to locate the server function address and argument signature in the associated subsystem.

NOTES

This interface is machine word length specific because of the port name parameter.

RETURN VALUES

KERN_SUCCESS
The right is allocated.

KERN_INVALID_TASK
The space is null.

KERN_INVALID_TASK
The space is dead.

KERN_RESOURCE_SHORTAGE
Couldn't allocate memory.

KERN_NO_SPACE
No room in space for another right.

RELATED INFORMATION

Functions: mach_subsystem_create, thread_activation_create.