mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
Fix for asterisk retaining parent process prio/rtprio.
PR: ports/127829 Submitted by: Wojciech Puchar <wojtek@tensor.gdynia.pl>
This commit is contained in:
parent
c6de3b8dc5
commit
c458e7bd28
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=221833
4 changed files with 80 additions and 0 deletions
20
net/asterisk/files/patch-main::utils.c
Normal file
20
net/asterisk/files/patch-main::utils.c
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
--- main/utils.c.orig 2008-05-29 19:20:16.000000000 +0200
|
||||||
|
+++ main/utils.c 2008-10-03 21:36:14.000000000 +0200
|
||||||
|
@@ -914,8 +914,7 @@
|
||||||
|
pthread_attr_init(attr);
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef __linux__
|
||||||
|
- /* 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
|
||||||
|
PTHREAD_INHERIT_SCHED; that way the -p option to set realtime
|
||||||
|
priority will propagate down to new threads by default.
|
||||||
|
@@ -924,7 +923,6 @@
|
||||||
|
the priority afterwards with pthread_setschedparam(). */
|
||||||
|
if ((errno = pthread_attr_setinheritsched(attr, PTHREAD_INHERIT_SCHED)))
|
||||||
|
ast_log(LOG_WARNING, "pthread_attr_setinheritsched: %s\n", strerror(errno));
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
if (!stacksize)
|
||||||
|
stacksize = AST_STACKSIZE;
|
20
net/asterisk10/files/patch-main::utils.c
Normal file
20
net/asterisk10/files/patch-main::utils.c
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
--- main/utils.c.orig 2008-05-29 19:20:16.000000000 +0200
|
||||||
|
+++ main/utils.c 2008-10-03 21:36:14.000000000 +0200
|
||||||
|
@@ -914,8 +914,7 @@
|
||||||
|
pthread_attr_init(attr);
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef __linux__
|
||||||
|
- /* 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
|
||||||
|
PTHREAD_INHERIT_SCHED; that way the -p option to set realtime
|
||||||
|
priority will propagate down to new threads by default.
|
||||||
|
@@ -924,7 +923,6 @@
|
||||||
|
the priority afterwards with pthread_setschedparam(). */
|
||||||
|
if ((errno = pthread_attr_setinheritsched(attr, PTHREAD_INHERIT_SCHED)))
|
||||||
|
ast_log(LOG_WARNING, "pthread_attr_setinheritsched: %s\n", strerror(errno));
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
if (!stacksize)
|
||||||
|
stacksize = AST_STACKSIZE;
|
20
net/asterisk14/files/patch-main::utils.c
Normal file
20
net/asterisk14/files/patch-main::utils.c
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
--- main/utils.c.orig 2008-05-29 19:20:16.000000000 +0200
|
||||||
|
+++ main/utils.c 2008-10-03 21:36:14.000000000 +0200
|
||||||
|
@@ -914,8 +914,7 @@
|
||||||
|
pthread_attr_init(attr);
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef __linux__
|
||||||
|
- /* 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
|
||||||
|
PTHREAD_INHERIT_SCHED; that way the -p option to set realtime
|
||||||
|
priority will propagate down to new threads by default.
|
||||||
|
@@ -924,7 +923,6 @@
|
||||||
|
the priority afterwards with pthread_setschedparam(). */
|
||||||
|
if ((errno = pthread_attr_setinheritsched(attr, PTHREAD_INHERIT_SCHED)))
|
||||||
|
ast_log(LOG_WARNING, "pthread_attr_setinheritsched: %s\n", strerror(errno));
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
if (!stacksize)
|
||||||
|
stacksize = AST_STACKSIZE;
|
20
net/asterisk16/files/patch-main::utils.c
Normal file
20
net/asterisk16/files/patch-main::utils.c
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
--- main/utils.c.orig 2008-05-29 19:20:16.000000000 +0200
|
||||||
|
+++ main/utils.c 2008-10-03 21:36:14.000000000 +0200
|
||||||
|
@@ -914,8 +914,7 @@
|
||||||
|
pthread_attr_init(attr);
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef __linux__
|
||||||
|
- /* 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
|
||||||
|
PTHREAD_INHERIT_SCHED; that way the -p option to set realtime
|
||||||
|
priority will propagate down to new threads by default.
|
||||||
|
@@ -924,7 +923,6 @@
|
||||||
|
the priority afterwards with pthread_setschedparam(). */
|
||||||
|
if ((errno = pthread_attr_setinheritsched(attr, PTHREAD_INHERIT_SCHED)))
|
||||||
|
ast_log(LOG_WARNING, "pthread_attr_setinheritsched: %s\n", strerror(errno));
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
if (!stacksize)
|
||||||
|
stacksize = AST_STACKSIZE;
|
Loading…
Add table
Reference in a new issue