This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
daniel gerrit-no-reply at lists.osmocom.orgdaniel has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/21464 ) Change subject: logging: Calculate LOG_MAX_{CTX,FILTERS} from the enum ...................................................................... logging: Calculate LOG_MAX_{CTX,FILTERS} from the enum Change-Id: I1ee1278b029e42321932b87f94aa3e0eeed4108a Related: SYS#5232 --- M include/osmocom/core/logging.h 1 file changed, 10 insertions(+), 10 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h index 6d0d5a3..38b465c 100644 --- a/include/osmocom/core/logging.h +++ b/include/osmocom/core/logging.h @@ -11,11 +11,6 @@ #include <osmocom/core/defs.h> #include <osmocom/core/linuxlist.h> -/*! Maximum number of logging contexts */ -#define LOG_MAX_CTX 8 -/*! Maximum number of logging filters */ -#define LOG_MAX_FILTERS 8 - #ifndef DEBUG #define DEBUG #endif @@ -162,11 +157,6 @@ uint8_t enabled; /*!< is this category enabled or not */ }; -/*! Log context information, passed to filter */ -struct log_context { - void *ctx[LOG_MAX_CTX+1]; -}; - /*! Indexes to indicate the object currently acted upon. * Array indexes for the global \a log_context array. */ enum log_ctx_index { @@ -191,6 +181,16 @@ _LOG_FLT_COUNT }; +/*! Maximum number of logging contexts */ +#define LOG_MAX_CTX _LOG_CTX_COUNT +/*! Maximum number of logging filters */ +#define LOG_MAX_FILTERS _LOG_FLT_COUNT + +/*! Log context information, passed to filter */ +struct log_context { + void *ctx[LOG_MAX_CTX+1]; +}; + /*! Compatibility with older libosmocore versions */ #define LOG_FILTER_ALL (1<<LOG_FLT_ALL) /*! Compatibility with older libosmocore versions */ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21464 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I1ee1278b029e42321932b87f94aa3e0eeed4108a Gerrit-Change-Number: 21464 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201202/7f18667b/attachment.htm>