http://bugs.winehq.org/show_bug.cgi?id=19982
--- Comment #44 from Juan Lang juan_lang@yahoo.com 2009-09-30 17:40:51 --- That sounds like either the Linux kernel isn't scheduling on the thread you're asking it to, or that the APIC-based CPU identification isn't doing what you want.
I compiled and ran the test program here: http://lkml.org/lkml/2007/5/10/578 and it reported 0, which indicates that after calling sched_setaffinity, sched_getcpu reports the same CPU as sched_setaffinity requested. Thus, either sched_getcpu lying, or sched_setaffinity is doing what I want. If it's lying, it's a Linux kernel bug. Otherwise, the CPU identification is flawed under Wine, and likely a Wine bug.
In either case, _this_ bug will be fixed once my latest patch is committed, except on >= 32 CPU systems.. but I'm willing to leave that one alone until someone actually needs support for those.