Next: , Previous: Hosted Processors, Up: Processor Interface


9.2.2 Processor Control

— Function: kern_return_t processor_start (processor_t processor)
— Function: kern_return_t processor_exit (processor_t processor)
— Function: kern_return_t processor_control (processor_t processor, processor_info_t *cmd, mach_msg_type_number_t count)

Some multiprocessors may allow privileged software to control processors. The processor_start, processor_exit, and processor_control operations implement this. The interpretation of the command in cmd is machine dependent. A newly started processor is assigned to the default processor set. An exited processor is removed from the processor set to which it was assigned and ceases to be active.

count contains the length of the command cmd as a number of ints.

Availability limited. All of these operations are machine-dependent. They may do nothing. The ability to restart an exited processor is also machine-dependent.

This function returns KERN_SUCCESS if the operation was performed, KERN_FAILURE if the operation was not performed (a likely reason is that it is not supported on this processor), KERN_INVALID_ARGUMENT if processor is not a processor, and KERN_INVALID_ADDRESS if cmd points to inaccessible memory.