Author neologix
Recipients benjamin.peterson, meador.inge, neologix, skrah, vstinner
Date 2011-09-13.17:26:13
SpamBayes Score 0.000833222
Marked as misclassified No
Message-id <1315934774.39.0.412054047579.issue12936@psf.upfronthosting.co.za>
In-reply-to
Content
> I think I got it: pthread_setaffinity_np() does not crash.

Nice.
Out of curiosity, I just looked at the source code, and it just does sched_setaffinity(thread->tid), so you can do the same with sched_setaffinity(syscall(SYS_gettid)) for the current thread.
However, I don't think we should/could add this to the posix module: it expects a pthread_t instead of a PID, to which we don't have access.
Furthermore, even though we're linked with pthread, this should normally succeed - or at least not crash - when called from the main thread - and it does on my Debian squeeze box.
So I'd suggest closing this issue.
History
Date User Action Args
2011-09-13 17:26:14neologixsetrecipients: + neologix, vstinner, benjamin.peterson, skrah, meador.inge
2011-09-13 17:26:14neologixsetmessageid: <1315934774.39.0.412054047579.issue12936@psf.upfronthosting.co.za>
2011-09-13 17:26:13neologixlinkissue12936 messages
2011-09-13 17:26:13neologixcreate