mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
Core/General: Add #ifdef needed on FreeBSD.
pthread_attr_init() defaults to PTHREAD_EXPLICIT_SCHED on FreeBSD too. ASTERISK-25310 #close Reported by: Guido Falsi Change-Id: Iae6befac9028b5b9795f86986a4a08a1ae6ab7c4
This commit is contained in:
@@ -1251,8 +1251,8 @@ int ast_pthread_create_stack(pthread_t *thread, pthread_attr_t *attr, void *(*st
|
|||||||
pthread_attr_init(attr);
|
pthread_attr_init(attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __linux__
|
#if defined(__linux__) || defined(__FreeBSD__)
|
||||||
/* On Linux, pthread_attr_init() defaults to PTHREAD_EXPLICIT_SCHED,
|
/* On Linux and FreeBSD , pthread_attr_init() defaults to PTHREAD_EXPLICIT_SCHED,
|
||||||
which is kind of useless. Change this here to
|
which is kind of useless. Change this here to
|
||||||
PTHREAD_INHERIT_SCHED; that way the -p option to set realtime
|
PTHREAD_INHERIT_SCHED; that way the -p option to set realtime
|
||||||
priority will propagate down to new threads by default.
|
priority will propagate down to new threads by default.
|
||||||
|
Reference in New Issue
Block a user