[Asterisk-code-review] Core/General: Add #ifdef needed on FreeBSD. (asterisk[master])

Guido Falsi asteriskteam at digium.com
Tue Sep 1 10:19:19 CDT 2015


Guido Falsi has uploaded a new change for review.

  https://gerrit.asterisk.org/1171

Change subject: Core/General: Add #ifdef needed on FreeBSD.
......................................................................

Core/General: Add #ifdef needed on FreeBSD.

pthread_attr_init() defaults to PTHREAD_EXPLICIT_SCHED on FreeBSD
too.

ASTERISK-25310
Reported by: Guido Falsi

Change-Id: Iae6befac9028b5b9795f86986a4a08a1ae6ab7c4
---
M main/utils.c
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/71/1171/1

diff --git a/main/utils.c b/main/utils.c
index 4bcfa33..02a46c8 100644
--- a/main/utils.c
+++ b/main/utils.c
@@ -1251,8 +1251,8 @@
 		pthread_attr_init(attr);
 	}
 
-#ifdef __linux__
-	/* On Linux, pthread_attr_init() defaults to PTHREAD_EXPLICIT_SCHED,
+#ifdef __linux__ || defined(__FreeBSD__)
+	/* 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.

-- 
To view, visit https://gerrit.asterisk.org/1171
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae6befac9028b5b9795f86986a4a08a1ae6ab7c4
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Guido Falsi <madpilot at freebsd.org>



More information about the asterisk-code-review mailing list