Mercurial > cpython-lru_cache-weakref
comparison Python/thread_pthread.h @ 31379:4055375dc05e legacy-trunk
remove DGUX support.
| author | Skip Montanaro <skip@pobox.com> |
|---|---|
| date | Sat, 17 Jan 2004 00:29:32 +0000 |
| parents | 4c8160088b34 |
| children | 66e43f25046d |
comparison
equal
deleted
inserted
replaced
| 31378:64ae832131e1 | 31379:4055375dc05e |
|---|---|
| 53 # else | 53 # else |
| 54 # define PY_PTHREAD_D7 | 54 # define PY_PTHREAD_D7 |
| 55 # error Systems with PY_PTHREAD_D7 are unsupported. See README. | 55 # error Systems with PY_PTHREAD_D7 are unsupported. See README. |
| 56 # endif | 56 # endif |
| 57 | 57 |
| 58 #elif defined(__DGUX) | |
| 59 # define PY_PTHREAD_D6 | |
| 60 # error Systems with PY_PTHREAD_D6 are unsupported. See README. | |
| 61 | |
| 62 #elif defined(__hpux) && defined(_DECTHREADS_) | 58 #elif defined(__hpux) && defined(_DECTHREADS_) |
| 63 # define PY_PTHREAD_D4 | 59 # define PY_PTHREAD_D4 |
| 64 # error Systems with PY_PTHREAD_D4 are unsupported. See README. | 60 # error Systems with PY_PTHREAD_D4 are unsupported. See README. |
| 65 | 61 |
| 66 #else /* Default case */ | 62 #else /* Default case */ |
| 78 # define pthread_mutexattr_default pthread_mutexattr_default | 74 # define pthread_mutexattr_default pthread_mutexattr_default |
| 79 #endif | 75 #endif |
| 80 #if !defined(pthread_condattr_default) | 76 #if !defined(pthread_condattr_default) |
| 81 # define pthread_condattr_default pthread_condattr_default | 77 # define pthread_condattr_default pthread_condattr_default |
| 82 #endif | 78 #endif |
| 83 #elif defined(PY_PTHREAD_STD) || defined(PY_PTHREAD_D6) | 79 #elif defined(PY_PTHREAD_STD) |
| 84 #if !defined(pthread_attr_default) | 80 #if !defined(pthread_attr_default) |
| 85 # define pthread_attr_default ((pthread_attr_t *)NULL) | 81 # define pthread_attr_default ((pthread_attr_t *)NULL) |
| 86 #endif | 82 #endif |
| 87 #if !defined(pthread_mutexattr_default) | 83 #if !defined(pthread_mutexattr_default) |
| 88 # define pthread_mutexattr_default ((pthread_mutexattr_t *)NULL) | 84 # define pthread_mutexattr_default ((pthread_mutexattr_t *)NULL) |
| 209 status = pthread_create(&th, | 205 status = pthread_create(&th, |
| 210 #if defined(PY_PTHREAD_D4) | 206 #if defined(PY_PTHREAD_D4) |
| 211 pthread_attr_default, | 207 pthread_attr_default, |
| 212 (pthread_startroutine_t)func, | 208 (pthread_startroutine_t)func, |
| 213 (pthread_addr_t)arg | 209 (pthread_addr_t)arg |
| 214 #elif defined(PY_PTHREAD_D6) | |
| 215 pthread_attr_default, | |
| 216 (void* (*)(void *))func, | |
| 217 arg | |
| 218 #elif defined(PY_PTHREAD_D7) | 210 #elif defined(PY_PTHREAD_D7) |
| 219 pthread_attr_default, | 211 pthread_attr_default, |
| 220 func, | 212 func, |
| 221 arg | 213 arg |
| 222 #elif defined(PY_PTHREAD_STD) | 214 #elif defined(PY_PTHREAD_STD) |
| 237 pthread_attr_destroy(&attrs); | 229 pthread_attr_destroy(&attrs); |
| 238 #endif | 230 #endif |
| 239 if (status != 0) | 231 if (status != 0) |
| 240 return -1; | 232 return -1; |
| 241 | 233 |
| 242 #if defined(PY_PTHREAD_D4) || defined(PY_PTHREAD_D6) || defined(PY_PTHREAD_D7) | 234 #if defined(PY_PTHREAD_D4) || defined(PY_PTHREAD_D7) |
| 243 pthread_detach(&th); | 235 pthread_detach(&th); |
| 244 #elif defined(PY_PTHREAD_STD) | 236 #elif defined(PY_PTHREAD_STD) |
| 245 pthread_detach(th); | 237 pthread_detach(th); |
| 246 #endif | 238 #endif |
| 247 | 239 |
