[chrony-dev] Re: [PATCH] Use pthread_setschedparam instead of sched_setscheduler |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: [chrony-dev] Re: [PATCH] Use pthread_setschedparam instead of sched_setscheduler
- From: "Stefan R. Filipek" <srfilipek@xxxxxxxxx>
- Date: Fri, 5 Apr 2019 09:14:43 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Btwxwu5uQ+iu9vb3cFDQ4qTlP341KykkesOSbGSOh+s=; b=Aq/vlJe1aaxrLirhVM5MIGwO47NvJrxjLoZrh7JQm+ZFTy931yggYySxM5el931i9j LVUvJsfWtLlex9wy905Knx+jt5YpBckncS6eLn7N2NIl8/J1Hvyx//fNkF9tyz5/jNbg saUEanD4zDFqapuiiujfHBp+a7Ox5Ed+Tbjups6OSWL1+G7NwsGZX1h2hvfALJR67VZG oU4oKLEsRzKqacCOywI1IYhsryaRICCbfeEPuBualVoM6pR/yLkJGGubMBfgWxpVIgQK g7OBJQHxXfG0TPAHNZv2g1gQcv4gk3+K7Qkr7FqZ6jHkWbYrUPd6wsCUAvLkKEk94It8 PpSQ==
Addendum: Incremental patch so we only include '-pthread' once in the
compilation flags.
Regards,
Stefan
diff --git a/configure b/configure
index 565b888..49ba7bc 100755
--- a/configure
+++ b/configure
@@ -227,6 +227,7 @@ feat_timestamping=1
try_timestamping=0
feat_ntp_signd=0
ntp_era_split=""
+use_pthread=0
default_user="root"
default_hwclockfile=""
default_pidfile="/var/run/chrony/chronyd.pid"
@@ -652,7 +653,7 @@ then
add_def FEAT_ASYNCDNS
add_def USE_PTHREAD_ASYNCDNS
EXTRA_OBJECTS="$EXTRA_OBJECTS nameserv_async.o"
- MYCFLAGS="$MYCFLAGS -pthread"
+ use_pthread=1
fi
if test_code 'arc4random_buf()' 'stdlib.h' '' ''
'arc4random_buf(NULL, 0);'; then
@@ -793,7 +794,7 @@ if [ $try_setsched = "1" ] && \
pthread_setschedparam(pthread_self(), SCHED_FIFO, &sched);'
then
add_def HAVE_PTHREAD_SETSCHEDPARAM
- MYCFLAGS="$MYCFLAGS -pthread"
+ use_pthread=1
fi
if [ $try_lockmem = "1" ] && \
@@ -897,6 +898,10 @@ if [ $feat_sechash = "1" ] && [ "x$HASH_LINK" =
"x" ] && [ $try_tomcrypt = "1" ]
fi
fi
+if [ $use_pthread = "1" ]; then
+ MYCFLAGS="$MYCFLAGS -pthread"
+fi
+
SYSCONFDIR=/etc
if [ "x$SETSYSCONFDIR" != "x" ]; then
SYSCONFDIR=$SETSYSCONFDIR
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.