]> granicus.if.org Git - python/commitdiff
DG/UX thread patches (Ross Andrus)
authorGuido van Rossum <guido@python.org>
Thu, 22 May 1997 20:41:59 +0000 (20:41 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 22 May 1997 20:41:59 +0000 (20:41 +0000)
Python/thread.c
Python/thread_pthread.h

index 2d042568d5a9c0efc961c62782972c83d9b57240..1698b078a4dd1b284fd0ebbde393c20ab19d1cf7 100644 (file)
@@ -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
index 517def50771897cd7939bcc1626daa3d3fcfce86..8e6ca86ed926681fb894d43c3082465ef7355809 100644 (file)
@@ -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);