Can code be given exclusive CPU access in XP?
-
Hello everyone... Is there a way to give a piece of code exclusive access to the CPU without fear of interruption from Windows? Something similar to a critical section, but across processes -- not just threads. And in user space... not kernel level or anything. If not, I imagine it's for stability reasons... but I figured there'd at least be *something*. Any help would be very appreciated... thanks! - Som (I posted this in the Visual C++ because I'm using C to program this...)
-
Hello everyone... Is there a way to give a piece of code exclusive access to the CPU without fear of interruption from Windows? Something similar to a critical section, but across processes -- not just threads. And in user space... not kernel level or anything. If not, I imagine it's for stability reasons... but I figured there'd at least be *something*. Any help would be very appreciated... thanks! - Som (I posted this in the Visual C++ because I'm using C to program this...)
-
Hello everyone... Is there a way to give a piece of code exclusive access to the CPU without fear of interruption from Windows? Something similar to a critical section, but across processes -- not just threads. And in user space... not kernel level or anything. If not, I imagine it's for stability reasons... but I figured there'd at least be *something*. Any help would be very appreciated... thanks! - Som (I posted this in the Visual C++ because I'm using C to program this...)
No.
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
-
Hello everyone... Is there a way to give a piece of code exclusive access to the CPU without fear of interruption from Windows? Something similar to a critical section, but across processes -- not just threads. And in user space... not kernel level or anything. If not, I imagine it's for stability reasons... but I figured there'd at least be *something*. Any help would be very appreciated... thanks! - Som (I posted this in the Visual C++ because I'm using C to program this...)
Hi, You can try to increase your Thread priority. This sounds like the thing you wanted, but you have to be carefully though, because when doing this you could make the OS instable.
BOOL SetThreadPriority( HANDLE hThread, int nPriority );
Where hThread is the handle of the thread and nPriority is one of the following values:
THREAD_PRIORITY_TIME_CRITICAL THREAD_PRIORITY_HIGHEST THREAD_PRIORITY_ABOVE_NORMAL THREAD_PRIORITY_NORMAL THREAD_PRIORITY_BELOW_NORMAL THREAD_PRIORITY_LOWEST THREAD_PRIORITY_IDLE
codito ergo sum