summaryrefslogtreecommitdiff
path: root/net/asterisk/files/patch-main-utils.c
blob: 9bba111de43411be87a19e9a6758f2225204af4f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;