From: Tom Jones Date: Fri, 26 Jan 2024 17:44:33 +0000 (+0000) Subject: svm: Add FreeBSD specific signal handling path X-Git-Tag: v24.10-rc0~254 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=775002358fae5767170733f1d781c49a991a482a;p=vpp.git svm: Add FreeBSD specific signal handling path FreeBSD's siginfo_t doesn't have the ptr value used on linux to encode a token. Fow now recover the code from siginfo_t and leave the opaque value as 0. Type: improvement Change-Id: Ic6ef96f018b326b99d68534a4488cfc49fdf16e1 Signed-off-by: Tom Jones --- diff --git a/src/svm/svmdbtool.c b/src/svm/svmdbtool.c index feb7eed07ef..b60b86db29d 100644 --- a/src/svm/svmdbtool.c +++ b/src/svm/svmdbtool.c @@ -248,11 +248,16 @@ static void sigaction_handler (int signum, siginfo_t * i, void *notused) { u32 action, opaque; +#ifdef __linux__ action = (u32) (uword) i->si_ptr; action >>= 28; opaque = (u32) (uword) i->si_ptr; opaque &= ~(0xF0000000); +#elif __FreeBSD__ + action = i->si_code; + opaque = 0; +#endif /* __linux__ */ clib_warning ("signal %d, action %d, opaque %x", signum, action, opaque); }