11-21-2012 12:02 PM
Can you do multithreading running on multicores in LabWindowsCVI?
Case: I have 5 threads: thread1, thread2, thread3, thread4, thread5. Each thread is running complicated analysis function for LTE. I would like thread1 to run on CPU1, thread2 on CPU2, thread3 on CPU3, thread4 on CPU4, thread5 on CPU5.
My environment is: WindowsXP Professional 32-bit. I have 8 core Xeon, with virtual core it becomes 16.
LabWindowsCVI2010.
Thanks.
Juswanto
11-22-2012 05:04 AM
Probably you have to use the WinAPI function SetThreadAffinityMask(). For documentation you may start at http://msdn.microsoft.com/en-us/library/windows/desktop/ms684251(v=vs.85).aspx