Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1a62311

Browse files
committed
Changes necessary for AIX.
1 parent 1741d60 commit 1a62311

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

Python/thread_pthread.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,24 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2727
#include <stdlib.h>
2828
#include <pthread.h>
2929

30+
#ifdef _AIX
31+
32+
#ifndef SCHED_BG_NP
33+
/* SCHED_BG_NP is defined if using AIX DCE pthreads
34+
* but it is unsupported by AIX 4 pthreads. Default
35+
* attributes for AIX 4 pthreads equal to NULL. For
36+
* AIX DCE pthreads they should be left unchanged.
37+
*/
38+
#define pthread_attr_default NULL
39+
#define pthread_mutexattr_default NULL
40+
#define pthread_condattr_default NULL
41+
#endif
42+
43+
#else
3044
#define pthread_attr_default ((pthread_attr_t *)0)
3145
#define pthread_mutexattr_default ((pthread_mutexattr_t *)0)
3246
#define pthread_condattr_default ((pthread_condattr_t *)0)
47+
#endif
3348

3449
/* A pthread mutex isn't sufficient to model the Python lock type
3550
* because, according to Draft 5 of the docs (P1003.4a/D5), both of the

0 commit comments

Comments
 (0)