diff options
author | Guido van Rossum <guido@python.org> | 1997-05-22 20:41:59 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-05-22 20:41:59 (GMT) |
commit | 64f9105fb7a9672ab9a27a75417e6e532625232f (patch) | |
tree | 5ffcc6c3829ffa971b07c4c00d07583c33fbb932 /Python | |
parent | b2c8ec4b75f9842042d0ca4ce19102580eafd373 (diff) | |
download | cpython-64f9105fb7a9672ab9a27a75417e6e532625232f.zip cpython-64f9105fb7a9672ab9a27a75417e6e532625232f.tar.gz cpython-64f9105fb7a9672ab9a27a75417e6e532625232f.tar.bz2 |
DG/UX thread patches (Ross Andrus)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/thread.c | 4 | ||||
-rw-r--r-- | Python/thread_pthread.h | 11 |
2 files changed, 12 insertions, 3 deletions
diff --git a/Python/thread.c b/Python/thread.c index 2d04256..1698b07 100644 --- a/Python/thread.c +++ b/Python/thread.c @@ -49,6 +49,10 @@ extern char *getenv(); #include <unistd.h> #endif +#ifdef __DGUX +#define _USING_POSIX4A_DRAFT6 +#endif + #ifdef __sgi #ifndef HAVE_PTHREAD_H /* XXX Need to check in configure.in */ #undef _POSIX_THREADS diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index 517def5..8e6ca86 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -70,7 +70,8 @@ PERFORMANCE OF THIS SOFTWARE. # define PY_PTHREAD_STD #elif defined(__linux) # define PY_PTHREAD_STD - +#elif defined(__DGUX) +# define PY_PTHREAD_D6 #endif @@ -80,7 +81,7 @@ PERFORMANCE OF THIS SOFTWARE. # define pthread_attr_default pthread_attr_default # define pthread_mutexattr_default pthread_mutexattr_default # define pthread_condattr_default pthread_condattr_default -#elif defined(PY_PTHREAD_STD) +#elif defined(PY_PTHREAD_STD) || defined(PY_PTHREAD_D6) # define pthread_attr_default ((pthread_attr_t *)NULL) # define pthread_mutexattr_default ((pthread_mutexattr_t *)NULL) # define pthread_condattr_default ((pthread_condattr_t *)NULL) @@ -136,6 +137,10 @@ int start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) pthread_attr_default, (pthread_startroutine_t)func, (pthread_addr_t)arg +#elif defined(PY_PTHREAD_D6) + pthread_attr_default, + (void* (*)_P((void *)))func, + arg #elif defined(PY_PTHREAD_D7) pthread_attr_default, func, @@ -148,7 +153,7 @@ int start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) ); if (success >= 0) { -#if defined(PY_THREAD_D4) || defined(PY_PTHREAD_D7) +#if defined(PY_THREAD_D4) || defined(PY_PTHREAD_D6) || defined(PY_PTHREAD_D7) pthread_detach(&th); #elif defined(PY_PTHREAD_STD) pthread_detach(th); |