## processor_assign

Function - Assign a processor to a processor set.

### SYNOPSIS

    kern_return_t	processor_assign
    		(processor_t	processor,
    		processor_set_t	new_set,
    		boolean_t	wait);

### PARAMETERS

processor
  [in processor send right] The processor to be assigned.
new_set
  [in processor-set-control send right] The control port for the processor set into which the processor is to be assigned.
wait
  [in scalar] True if the call should wait for the completion of the assignment.

### DESCRIPTION

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.

### RETURN VALUES

Only generic errors apply.

### RELATED INFORMATION

Functions: processor_set_create, processor_set_info, task_assign, thread_assign.