laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27591 )
Change subject: vty: Support platforms that don't support pthread_getname_np()
......................................................................
vty: Support platforms that don't support pthread_getname_np()
pthread_getname_np() is a non-portable extension of pthreads. While
it exists in glibc, for example musl didn't have it until rather
recently (April 2021) and there still hasn't yet been a musl release
with this change, resulting even current OpenWRT not yet supporting
pthread_getname_np.
So let's check if pthread_getname_np is supported, and only use it
in that case.
Change-Id: Ibd01485af24e2fe574006f8d049bf37226dda966
---
M configure.ac
M src/vty/cpu_sched_vty.c
2 files changed, 22 insertions(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, approved; Verified
Jenkins Builder: Verified
diff --git a/configure.ac b/configure.ac
index 0210926..990d0e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,6 +78,24 @@
# check for pthread (PTHREAD_CFLAGS, PTHREAD_LIBS)
AX_PTHREAD
+AC_MSG_CHECKING(for pthread_getname_np(pthread_t, char*, size_t))
+saved_CFLAGS="$CFLAGS"
+saved_LIBS="$LIBS"
+CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+LIBS="$LIBS $PTHREAD_LIBS"
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#define _GNU_SOURCE
+ #include <pthread.h>],
+ [pthread_getname_np(pthread_self(),"example",0)])],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_PTHREAD_GETNAME_NP,1,
+ [Have function pthread_setname_np(const char*)])],
+ [AC_MSG_RESULT(no)])
+CFLAGS="$saved_CFLAGS"
+LIBS="$saved_LIBS"
+
+
# check for old glibc < 2.17 to get clock_gettime
AC_SEARCH_LIBS([clock_gettime], [rt posix4],
[AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define if clock_gettime is available])
diff --git a/src/vty/cpu_sched_vty.c b/src/vty/cpu_sched_vty.c
index 0b4b249..dbb3cd5 100644
--- a/src/vty/cpu_sched_vty.c
+++ b/src/vty/cpu_sched_vty.c
@@ -25,6 +25,8 @@
#define _GNU_SOURCE
+#include "../../config.h"
+
#include <string.h>
#include <stdlib.h>
#include <errno.h>
@@ -637,8 +639,10 @@
return 0;
}
+#ifdef HAVE_PTHREAD_GETNAME_NP
if (pthread_getname_np(pthread_self(), name, sizeof(name)) == 0)
has_name = true;
+#endif
/* Get latest matching mask for the thread */
pthread_mutex_lock(&sched_vty_opts->cpu_affinity_li_mutex);
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27591
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ibd01485af24e2fe574006f8d049bf37226dda966
Gerrit-Change-Number: 27591
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27591 )
Change subject: vty: Support platforms that don't support pthread_getname_np()
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27591
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ibd01485af24e2fe574006f8d049bf37226dda966
Gerrit-Change-Number: 27591
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 29 Mar 2022 12:57:59 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27598 )
Change subject: configure: Support libsctp < 1.0.17 without libsctp.pc
......................................................................
Patch Set 1:
(1 comment)
File libosmocore.pc.in:
https://gerrit.osmocom.org/c/libosmocore/+/27598/comment/1dd72c1f_b36904b8
PS1, Line 10: Requires.private: @LIBSCTP_PC@
> with this approach if the .pc is found it ends up looking like this: […]
Ack
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27598
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I241634388c2d32adffebd860c88bdd13002a6af0
Gerrit-Change-Number: 27598
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 29 Mar 2022 12:57:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27594 )
Change subject: bsc: Add tests for CBSP MESSAGE STATUS QUERY procedure
......................................................................
Patch Set 1:
(1 comment)
File library/CBSP_Templates.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27594/comment/85c58f1d_a314…
PS1, Line 713: function ts_CBSP_MSG_STATUS_QUERY_FAIL(template (value) uint16_t msg_id, template (value) uint16_t old_ser_nr,
> we usually have f_ts_* and f_tr_* for functions like this.
As far as I coudl see, not in this file; I always try to align with the surrounding code.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27594
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I124a69c515d634bc054ed35e430af6b3c11ad46e
Gerrit-Change-Number: 27594
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 29 Mar 2022 12:55:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: neels.
Hello Jenkins Builder, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bsc/+/27596
to look at the new patch set (#3).
Change subject: hodec2: add penalty-time low-rxqual-ho
......................................................................
hodec2: add penalty-time low-rxqual-ho
When bad RxQual causes handover to a cell with weaker RxLev, then
handover oscillation *will* happen, as shown in test_rxqual.ho_vty.
Introduce a penalty timer for a cell where we had bad RxQual.
This delays handover back to the cell with stronger RxLev by the penalty
timeout; hopefully the interference is gone after the timeout.
Usually, we set new configuration elements so that osmo-bsc behaves the
same as before the config item was added. In this instance, this makes
no sense, because no-one ever wants handover oscillation from bad
RxQual, which is guaranteed to happen without the new penalty timer. Set
it to 60 seconds by default, same as other penalty timers.
Related: SYS#5911
Change-Id: I057b156604a104a26a7ce45d1c7adadbf452c932
---
M include/osmocom/bsc/handover_cfg.h
M src/osmo-bsc/handover_decision_2.c
M tests/handover/test_rxqual.ho_vty
M tests/handover_cfg.vty
4 files changed, 44 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/96/27596/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27596
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I057b156604a104a26a7ce45d1c7adadbf452c932
Gerrit-Change-Number: 27596
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newpatchset