I've been floating around the web looking for a way to add a cap to my Cpp program's processor use, and so far I've only come across a few painful looking Cpp-to-assembly tutorials and a bindprocessor function in an IBM API. I was wondering if any of you wizards knew how to cap or limit processor use in a C or Cpp program.
I'm already using: SetPriorityClass(theApp, REALTIME_PRIORITY_CLASS);
to try and boost the importance of my program during load-time, but I don't see this change reflected in the task manager (which still says my program's priority is 'Normal') Is there some other method that I can use to force M$ windows to listen to my priority designations? Or is she going to do her own thing despite my best efforts?
Additionally, I was wondering if there's a MFC or other option to limit a thread or a program to a single core on a multi-core processor?
(If I can do either of these things, I can finish my project.)
Any help would be well welcome.