[Bug 19982] SetThreadAffinityMask() seems not to work correctly

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Sep 30 19:40:33 CDT 2009


http://bugs.winehq.org/show_bug.cgi?id=19982





--- Comment #49 from ray at pobox.co.uk  2009-09-30 19:40:33 ---
(In reply to comment #48)
> Yes, and it fails in the same way here, if I understand the program well
> enough.  (I confess to finding SIV pretty confusing.)  Nevertheless, the
> sched_setaffinity calls succeed.  (I instrumented my own wineserver to verify
> it.)  So I'm leaning toward this being a kernel bug.

I think having a simple program to test this would be a good move.  Looking in
the Windows API I would like to use GetCurrentProcessorNumber() which returns
the zero based CPU number.  It's new in Vista and not in Wine.  Having this
would be very helpful, what is the best way to get it added to Wine ?  Is there
a Linux API that will do this ?

> Once we ask the kernel to
> schedule a thread on a different CPU, and the kernel says, "righto," there's
> nothing more we can do, is there?

If this is a Linux bug then can it we worked around ?  I am wondering if doing
a sched_yield() or similar after the affinity has been set would trigger a
switch to the appropriate CPU.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list