Next: , Up: Processor Interface

9.2.1 Hosted Processors

— Function: kern_return_t host_processors (host_priv_t host_priv, processor_array_t *processor_list, mach_msg_type_number_t *processor_count)

The function host_processors gets send rights to the processor port for each processor existing on host_priv. This is the privileged port that allows its holder to control a processor.

processor_list is an array that is created as a result of this call. The caller may wish to vm_deallocate this array when the data is no longer needed. processor_count is set to the number of processors in the processor_list.

This function returns KERN_SUCCESS if the call succeeded, KERN_INVALID_ARGUMENT if host_priv is not a privileged host port, and KERN_INVALID_ADDRESS if processor_count points to inaccessible memory.