LabWindows/CVI Real-Time Module

Setting Processor Affinity in Multiple-CPU Systems

  • Updated2023-02-21
  • 1 minute(s) read

Use the Symmetric Multiprocessing Functions in the Real-Time Utility Library to assign threads to CPUs. Call SetProcessorAffinityForThread to assign a thread to a specific CPU. Note that setting the processor affinity for a thread does not give the thread exclusive use of that CPU. You must call ConfigureProcessorPool to remove the CPU from the system processor pool. Once you remove a CPU from the system pool, the CPU run only threads that you assign to it.