#include <mach/processor.h> also included by
<mach/mach.h>mach/processor.h
macro_processor_user_
#define _processor_user_
macroprocessor_MSG_COUNT
#define processor_MSG_COUNT 6
functionprocessor_start
extern kern_return_t processor_start(processor_t processor)
References to processor objects are returned by:
host_processors(host_priv_t,...);
Start processor.
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Start a processor.
The processor_start function allows privileged software to start a processor in a multi-processor that so allows it. A newly started processor is assigned to the default processor set. The interpretation of this operation is machine dependent.
Notes. This operation is machine dependent. It may do nothing.
Cautions. The ability to restart an exited processor is machine dependent.
| KERN_FAILURE | The operation was not performed. A likely reason is that it is not supported on this processor. |
functionprocessor_exit
extern kern_return_t processor_exit(processor_t processor)
Exit processor -- may not be restartable.
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Exit a processor.
The processor_exit function allows privileged software to exit a processor in a multi-processor that so allows it. An exited processor is removed from the processor set to which it was assigned and ceases to be active. The interpretation of this operation is machine dependent.
Notes. This operation is machine dependent. It may do nothing.
Cautions. The ability to restart an exited processor is machine dependent.
| KERN_FAILURE | The operation was not performed. A likely reason is that it is not supported on this processor. |
functionprocessor_info
extern kern_return_t processor_info( processor_t processor, processor_flavor_t flavor, host_t *host, /* out */ processor_info_t processor_info_out, /* out */ mach_msg_type_number_t *processor_info_outCnt )
Return information about this processor.
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Return information about a processor.
The processor_info function returns selected information for a processor, as specified by flavor.
functionprocessor_control
extern kern_return_t processor_control( processor_t processor, processor_info_t processor_cmd, mach_msg_type_number_t processor_cmdCnt )
Do something machine-dependent to processor.
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Perform caller-specified operation on target processor. (Protected Interface.)
The processor_control function allows privileged software to control a processor in a multi-processor that so allows it. The interpretation of cmd is machine dependent.
Notes. These operations are machine dependent. They may do nothing.
| KERN_FAILURE | The operation was not performed. A likely reason is that it is not supported on this processor. |
functionprocessor_assign
extern kern_return_t processor_assign( processor_t processor, processor_set_t new_set, boolean_t wait )
JMM - Keep processor_set related stuff at the end because
they likely will be removed.
Assign processor to processor set.
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Assign a processor to a processor set.
The processor_assign function assigns processor to the set new_set. After the assignment is completed, the processor only executes threads that are assigned to that processor set. Any previous assignment of the processor is nullified. The master processor cannot be re-assigned.
The wait argument indicates whether the caller should wait for the assignment to be completed or should return immediately. Dedicated kernel threads are used to perform processor assignment, so setting wait to FALSE allows assignment requests to be queued and performed more quickly, especially if the kernel has more than one dedicated internal thread for processor assignment.
All processors take clock interrupts at all times. Redirection of other device interrupts away from processors assigned to other than the default processor set is machine dependent.
functionprocessor_get_assignment
extern kern_return_t processor_get_assignment( processor_t processor, processor_set_name_t *assigned_set /* out */ )
Get current assignment for processor.
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Get current assignment for a processor.
The processor_get_assignment function returns the name port for the processor set to which a desired processor is currently assigned.
| KERN_FAILURE | Processor is either shut down of off-line. |
macrosubsystem_to_name_map_processor
#define subsystem_to_name_map_processor { "processor_start", 3000 },
{ "processor_exit", 3001 },
{ "processor_info", 3002 },
{ "processor_control", 3003 },
{ "processor_assign", 3004 },
{ "processor_get_assignment", 3005 }