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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 8 16:11:01 CDT 2015


Joshua Colp has submitted this change and it was merged.

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 #close
Reported by: Guido Falsi

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

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Ashley Sanders: Looks good to me, but someone else must approve
  Matt Jordan: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved



diff --git a/main/utils.c b/main/utils.c
index 4bcfa33..ba1a07c 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,
+#if defined(__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: merged
Gerrit-Change-Id: Iae6befac9028b5b9795f86986a4a08a1ae6ab7c4
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Guido Falsi <madpilot at freebsd.org>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Ashley Sanders <asanders at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-commits mailing list