Next: , Previous: Processor Set Access, Up: Processor Set Interface


9.1.3 Processor Set Creation

— Function: kern_return_t processor_set_create (host_t host, processor_set_t *new_set, processor_set_name_t *new_name)

The function processor_set_create creates a new processor set on host and returns the two ports associated with it. The port returned in new_set is the actual port representing the set. It is used to perform operations such as assigning processors, tasks, or threads. The port returned in new_name identifies the set, and is used to obtain information about the set.

This function returns KERN_SUCCESS if the call succeeded, KERN_INVALID_ARGUMENT if host is not a host, KERN_INVALID_ADDRESS if new_set or new_name points to inaccessible memory and KERN_FAILURE is the operating system does not support processor allocation.