[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]


cma_thread_bind_to_cpu

Binds a thread to a particular CPU on a multiprocessor system.

Syntax

cma_thread_bind_to_cpu(
                        thread,
                        cpu_mask);
 


Argument Data Type Access

thread opaque cma_t_thread read cpu_mask unsigned long read


C Binding

#include 

void cma_thread_bind_to_cpu ( cma_t_thread *thread, unsigned long cpu_mask);

Arguments

thread
Handle of the thread to bind to the specified processor.
cpu_mask
Bit mask specifying which CPU the thread is to be bound to. The low-order bit represents the first CPU. Only one bit in this mask may be set.

Description

This routine binds a thread to a particular processor on a multiprocessor system. Once bound, a thread will only run on the specified CPU until the thread terminates, or the binding is changed.

Specify a cpu_mask of 0 to allow a previously bound thread to execute on any available CPU.

This routine is not available on all platforms. If it is not available, it will raise the cma_e_unimp exception.

Exceptions

cma_e_badparam
cma_e_unimp



[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]