Set program affinity

Does anybody know how to start a program running on a certain CPU? I can change the affinity using the Toradex Task manager tool, but I’d like to have this happen automatically. It looks like I can structure something in a windows shortcut, but after trying for a while now, I’ve had no luck.

Hi @mdeiss ,

Unfortunately there is no simple way to set the affinity to a specific CPU with some shortcut settings.

If you are trying to set the affinity of your own application to some specific CPU you can call this API at the beginning of WinMain to force it:

CeSetProcessAffinity ()

Or you can write a little tool that sets the affinity of an application that you pass as a parameter.

NOTE: Some programs that are built to run on CE6 or earlier or any .net program will run only on CPU1 for compatibility reasons. They might also run on multiple cores, but could crash as they were not tested for this. From our experience all .net 3.5 applications will run unstable if forced to run on multiple cores.