summaryrefslogtreecommitdiffstats
path: root/Python/thread_pthread.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-08-08 18:53:41 (GMT)
committerGuido van Rossum <guido@python.org>1996-08-08 18:53:41 (GMT)
commit1a62311cfb5612435accd980f6b80716022ff11f (patch)
treea4592751fdcb2dbc276c5de456ec1e3d181cf7db /Python/thread_pthread.h
parent1741d607255226e721098c8b723f11586887344e (diff)
downloadcpython-1a62311cfb5612435accd980f6b80716022ff11f.zip
cpython-1a62311cfb5612435accd980f6b80716022ff11f.tar.gz
cpython-1a62311cfb5612435accd980f6b80716022ff11f.tar.bz2
Changes necessary for AIX.
Diffstat (limited to 'Python/thread_pthread.h')
-rw-r--r--Python/thread_pthread.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index 9058bf7..0485e66 100644
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -27,9 +27,24 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <stdlib.h>
#include <pthread.h>
+#ifdef _AIX
+
+#ifndef SCHED_BG_NP
+/* SCHED_BG_NP is defined if using AIX DCE pthreads
+ * but it is unsupported by AIX 4 pthreads. Default
+ * attributes for AIX 4 pthreads equal to NULL. For
+ * AIX DCE pthreads they should be left unchanged.
+ */
+#define pthread_attr_default NULL
+#define pthread_mutexattr_default NULL
+#define pthread_condattr_default NULL
+#endif
+
+#else
#define pthread_attr_default ((pthread_attr_t *)0)
#define pthread_mutexattr_default ((pthread_mutexattr_t *)0)
#define pthread_condattr_default ((pthread_condattr_t *)0)
+#endif
/* A pthread mutex isn't sufficient to model the Python lock type
* because, according to Draft 5 of the docs (P1003.4a/D5), both of the