[Asterisk-code-review] Core/General: Add #ifdef needed on FreeBSD. (asterisk[11])
    Joshua Colp 
    asteriskteam at digium.com
       
    Tue Sep  8 15:48:25 CDT 2015
    
    
  
Joshua Colp has uploaded a new change for review.
  https://gerrit.asterisk.org/1224
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(-)
  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/24/1224/1
diff --git a/main/utils.c b/main/utils.c
index deb6d7e..3fa0b76 100644
--- a/main/utils.c
+++ b/main/utils.c
@@ -1242,8 +1242,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/1224
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae6befac9028b5b9795f86986a4a08a1ae6ab7c4
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Guido Falsi <madpilot at freebsd.org>
    
    
More information about the asterisk-code-review
mailing list