1 FreeBSD porting fixes, patch by maho@openoffice.org
3 --- python3.orig/Lib/test/test_threading.py 2015-07-05 18:50:07.000000000 +0200
4 +++ python3/Lib/test/test_threading.py 2015-07-26 17:03:55.935367820 +0200
6 # #12316 and #11870), and fork() from a worker thread is known to trigger
7 # problems with some operating systems (issue #3863): skip problematic tests
8 # on platforms known to behave badly.
9 -platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'netbsd5',
11 +platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'netbsd5',
12 + 'os2emx', 'hp-ux11')
15 # A trivial mutable counter.
16 --- Python-3.3.0/Python/thread_pthread.h 2012-11-28 09:00:41.097955124 +0000
17 +++ Python-3.3.0/Python/thread_pthread.h 2012-11-28 09:01:13.018329351 +0000
23 +#include <osreldate.h>
26 /* The POSIX spec says that implementations supporting the sem_*
27 family of functions must indicate this by defining
30 in default setting. So the process scope is preferred to get
31 enough number of threads to work. */
33 -#include <osreldate.h>
34 #if __FreeBSD_version >= 500000 && __FreeBSD_version < 504101
35 #undef PTHREAD_SYSTEM_SCHED_SUPPORTED
44 #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
48 #if defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
49 pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM);
54 + SET_THREAD_SIGMASK(SIG_BLOCK, &set, &oset);
56 status = pthread_create(&th,
57 #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
64 + SET_THREAD_SIGMASK(SIG_SETMASK, &oset, NULL);
66 #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
67 pthread_attr_destroy(&attrs);