diff options
author | Damiano Galassi <[email protected]> | 2020-07-10 17:16:04 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2020-08-03 16:19:10 +0200 |
commit | 63d33c9982fd1d6b91ee84fb037c1d6ccb31da11 (patch) | |
tree | 50413bb42d5031badcaec62c9f1d6394c59ae81d /libhb/ports.c | |
parent | 7a0319b4922f61a01073e65112a4e70ebb253cc3 (diff) |
libhb: do not set thread priorities on Darwin arm. Original patch contributed by Apple.
Diffstat (limited to 'libhb/ports.c')
-rw-r--r-- | libhb/ports.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libhb/ports.c b/libhb/ports.c index 8dbc996fe..06a34080f 100644 --- a/libhb/ports.c +++ b/libhb/ports.c @@ -852,7 +852,7 @@ static uint64_t hb_thread_to_integer( const hb_thread_t* t ) * hb_thread_func() ************************************************************************ * We use it as the root routine for any thread, for two reasons: - * + To set the thread priority on OS X (pthread_setschedparam() could + * + To set the thread priority on macOS (pthread_setschedparam() could * be called from hb_thread_init(), but it's nicer to do it as we * are sure it is done before the real routine starts) * + Get informed when the thread exits, so we know whether @@ -862,8 +862,9 @@ static void attribute_align_thread hb_thread_func( void * _t ) { hb_thread_t * t = (hb_thread_t *) _t; -#if defined( SYS_DARWIN ) || defined( SYS_FREEBSD ) || defined ( __FreeBSD__ ) || defined(SYS_NETBSD) - /* Set the thread priority */ +#if (defined( SYS_DARWIN ) && !defined(__aarch64__)) || defined( SYS_FREEBSD ) || defined ( __FreeBSD__ ) || defined(SYS_NETBSD) + /* Set the thread priority + Do not change priority on Darwin arm systems */ struct sched_param param; memset( ¶m, 0, sizeof( struct sched_param ) ); param.sched_priority = t->priority; |