Message282404
I wrote a patch based on msg281227's idea. I confirmed to pass related tests (test_capi, test_threading and test_tracemalloc) on Cygwin x86 and Ubuntu 16.04 x86.
This patch adds to change CPython about:
1. Avoid compile error on Currently TLS API.
With POSIX threads, configure script checks pthread_key_t type. And if the type is not integer, TLS API is implemented empty (do nothing or return fail).
2. Implement New TSS API based on C11 threads.
Thread key type is changed wrapped native TLS key type by typedef instead of integer, and the key parameter on key create function is changed to calling by pointer. Key create function doesn't support destructor because users have need to manage memory. And this patch changes Currently TLS API to call New TSS API. Or does it need to keep implementation?
3. Move to TSS API.
Py_DEPRECATED(3.7) is added to TLS API declaration, and Modules/_tracemalloc.c and Python/pystate.c are modified to use TSS API instead of TLS API. |
|
Date |
User |
Action |
Args |
2016-12-05 09:52:38 | masamoto | set | recipients:
+ masamoto, vstinner, r.david.murray, erik.bray, EdSchouten |
2016-12-05 09:52:37 | masamoto | set | messageid: <1480931557.7.0.386931450079.issue25658@psf.upfronthosting.co.za> |
2016-12-05 09:52:37 | masamoto | link | issue25658 messages |
2016-12-05 09:52:37 | masamoto | create | |
|