Mercurial > cpython-lru_cache-weakref
comparison Python/thread.c @ 71266:0aa3f90f0830
Issue #11863: Remove support for legacy systems deprecated in Python 3.2
(following PEP 11). These systems are systems using Mach C Threads,
SunOS lightweight processes, GNU pth threads and IRIX threads.
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Fri, 08 Jul 2011 23:47:50 +0200 |
| parents | 2b21fcf3d9a9 |
| children | f75fd74a0c13 |
comparison
equal
deleted
inserted
replaced
| 71265:638039a4fef3 | 71266:0aa3f90f0830 |
|---|---|
| 24 | 24 |
| 25 #include "pythread.h" | 25 #include "pythread.h" |
| 26 | 26 |
| 27 #ifndef _POSIX_THREADS | 27 #ifndef _POSIX_THREADS |
| 28 | 28 |
| 29 #ifdef __sgi | |
| 30 #define SGI_THREADS | |
| 31 #endif | |
| 32 | |
| 33 #ifdef HAVE_THREAD_H | |
| 34 #define SOLARIS_THREADS | |
| 35 #endif | |
| 36 | |
| 37 #if defined(sun) && !defined(SOLARIS_THREADS) | |
| 38 #define SUN_LWP | |
| 39 #endif | |
| 40 | |
| 41 /* Check if we're running on HP-UX and _SC_THREADS is defined. If so, then | 29 /* Check if we're running on HP-UX and _SC_THREADS is defined. If so, then |
| 42 enough of the Posix threads package is implemented to support python | 30 enough of the Posix threads package is implemented to support python |
| 43 threads. | 31 threads. |
| 44 | 32 |
| 45 This is valid for HP-UX 11.23 running on an ia64 system. If needed, add | 33 This is valid for HP-UX 11.23 running on an ia64 system. If needed, add |
| 91 /* Support for runtime thread stack size tuning. | 79 /* Support for runtime thread stack size tuning. |
| 92 A value of 0 means using the platform's default stack size | 80 A value of 0 means using the platform's default stack size |
| 93 or the size specified by the THREAD_STACK_SIZE macro. */ | 81 or the size specified by the THREAD_STACK_SIZE macro. */ |
| 94 static size_t _pythread_stacksize = 0; | 82 static size_t _pythread_stacksize = 0; |
| 95 | 83 |
| 96 #ifdef SGI_THREADS | |
| 97 #error SGI Irix threads are now unsupported, and code will be removed in 3.3. | |
| 98 #include "thread_sgi.h" | |
| 99 #endif | |
| 100 | |
| 101 #ifdef SOLARIS_THREADS | |
| 102 #define PYTHREAD_NAME "solaris" | |
| 103 #include "thread_solaris.h" | |
| 104 #endif | |
| 105 | |
| 106 #ifdef SUN_LWP | |
| 107 #error SunOS lightweight processes are now unsupported, and code will be removed in 3.3. | |
| 108 #include "thread_lwp.h" | |
| 109 #endif | |
| 110 | |
| 111 #ifdef HAVE_PTH | |
| 112 #error GNU pth threads are now unsupported, and code will be removed in 3.3. | |
| 113 #include "thread_pth.h" | |
| 114 #undef _POSIX_THREADS | |
| 115 #endif | |
| 116 | |
| 117 #ifdef _POSIX_THREADS | 84 #ifdef _POSIX_THREADS |
| 118 #define PYTHREAD_NAME "pthread" | 85 #define PYTHREAD_NAME "pthread" |
| 119 #include "thread_pthread.h" | 86 #include "thread_pthread.h" |
| 120 #endif | 87 #endif |
| 121 | 88 |
| 122 #ifdef C_THREADS | |
| 123 #error Mach C Threads are now unsupported, and code will be removed in 3.3. | |
| 124 #include "thread_cthread.h" | |
| 125 #endif | |
| 126 | |
| 127 #ifdef NT_THREADS | 89 #ifdef NT_THREADS |
| 128 #define PYTHREAD_NAME "nt" | 90 #define PYTHREAD_NAME "nt" |
| 129 #include "thread_nt.h" | 91 #include "thread_nt.h" |
| 130 #endif | 92 #endif |
| 131 | 93 |
| 132 #ifdef OS2_THREADS | 94 #ifdef OS2_THREADS |
| 133 #define PYTHREAD_NAME "os2" | 95 #define PYTHREAD_NAME "os2" |
| 134 #include "thread_os2.h" | 96 #include "thread_os2.h" |
| 135 #endif | |
| 136 | |
| 137 #ifdef PLAN9_THREADS | |
| 138 #define PYTHREAD_NAME "plan9" | |
| 139 #include "thread_plan9.h" | |
| 140 #endif | 97 #endif |
| 141 | 98 |
| 142 /* | 99 /* |
| 143 #ifdef FOOBAR_THREADS | 100 #ifdef FOOBAR_THREADS |
| 144 #include "thread_foobar.h" | 101 #include "thread_foobar.h" |
