Message143979
| Author |
neologix |
| Recipients |
benjamin.peterson, meador.inge, neologix, skrah, vstinner |
| Date |
2011年09月13日.17:26:13 |
| SpamBayes Score |
0.00083322154 |
| 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. |
|