sched_setaffinity pthread_setaffinity_np (NPTL-pthreads)
and i just found a linux-journal article: http://www.linuxjournal.com/article/6799
OK, thanks. Here's one about the MS version: http://msdn2.microsoft.com/en-us/library/ms684251(VS.85).aspx
It mentions the function SetThreadAffinityMask().
Martin