setthreadaffinitymask

SetThreadAffinityMask is ignored....any ideas?

Update: I found the problem - embarrassingly/ironically enough it was was calling SetThreadAffinity() in the wrong thread, not the main one (program startup is messy...) It's all working now, thanks for all the help! I've given everybody an upvote for taking part in my little debug session. ...

What good are thread affinity mask changes for the current thread?

Hello, I'm writing a game engine and I need a way to get a precise and accurate "deltatime" value from which to derive the current FPS for debug and also to limit the framerate (this is important for our project). Doing a bit of research, I found out one of the best ways to do this is to use WinAPI's QueryPerformanceCounter function. G...

Java thread affinity

Does anybody know of a way to lock down individual threads within a Java process to specific CPU cores (on Linux)? I've done this in C, but can't find how to do this in Java. My instincts are that this will require a JNI call, but I was hoping someone here might have some insight or might have done it before. Thanks! ...

pthreads_setaffinity_np: Invalid argument?

I've managed to get my pthreads program sort of working. Basically I am trying to manually set the affinity of 4 threads such that thread 1 runs on CPU 1, thread 2 runs on CPU 2, thread 3 runs on CPU 3, and thread 4 runs on CPU 4. After compiling, my code works for a few threads but not others (seems like thread 1 never works) but runni...

Why does NextValue call of performanceCounter change thread affinity mask

Hi. I have a C# project, where I have to both access the current workload of my processor, and ensure, that I run some specific code on every kernel of the processor. My problem is, that accessing the workload of my processor seems to prevent me from correctly assigning a thread affinity mask. I have some code here, that illustrates the...