diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2017-05-06 06:40:17 +0200 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2020-04-01 06:53:26 +0200 |
commit | 0bdeb5e58d8fdf8b0f30461a388768112b0e080c (patch) | |
tree | 8a5889d3b10b0b89a6fbf403f3bc7a3a040fce3e /configure.ac | |
parent | Merge pull request #5967 from rubenk/build-enable-wundef (diff) | |
download | frr-0bdeb5e58d8fdf8b0f30461a388768112b0e080c.tar.xz frr-0bdeb5e58d8fdf8b0f30461a388768112b0e080c.zip |
lib: rewrite zlog lock-free & TLS-buffered
This is a full rewrite of the "back end" logging code. It now uses a
lock-free list to iterate over logging targets, and the targets
themselves are as lock-free as possible. (syslog() may have a hidden
internal mutex in the C library; the file/fd targets use a single
write() call which should ensure atomicity kernel-side.)
Note that some functionality is lost in this patch:
- Solaris printstack() backtraces are ditched (unlikely to come back)
- the `log-filter` machinery is gone (re-added in followup commit)
- `terminal monitor` is temporarily stubbed out. The old code had a
race condition with VTYs going away. It'll likely come back rewritten
and with vtysh support.
- The `zebra_ext_log` hook is gone. Instead, it's now much easier to
add a "proper" logging target.
v2: TLS buffer to get some actual performance
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'configure.ac')
-rwxr-xr-x | configure.ac | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac index 628e0c8af..f2343cc1b 100755 --- a/configure.ac +++ b/configure.ac @@ -959,7 +959,7 @@ int main(int argc, char **argv) { AC_CHECK_HEADERS([pthread_np.h],,, [ #include <pthread.h> ]) -AC_CHECK_FUNCS([pthread_setname_np pthread_set_name_np]) +AC_CHECK_FUNCS([pthread_setname_np pthread_set_name_np pthread_getthreadid_np]) needsync=true @@ -1202,7 +1202,11 @@ dnl other functions dnl --------------- AC_CHECK_FUNCS([ \ strlcat strlcpy \ - getgrouplist]) + getgrouplist \ + openat \ + unlinkat \ + posix_fallocate \ + ]) dnl ########################################################################## dnl LARGE if block spans a lot of "configure"! @@ -2197,22 +2201,12 @@ if test "$enable_backtrace" != "no" ; then fi if test "$backtrace_ok" = "no"; then - case "$host_os" in - sunos* | solaris2*) - AC_CHECK_FUNCS([printstack], [ - AC_DEFINE([HAVE_PRINTSTACK], [1], [Solaris printstack]) + AC_CHECK_HEADER([execinfo.h], [ + AC_SEARCH_LIBS([backtrace], [execinfo], [ + AC_DEFINE([HAVE_GLIBC_BACKTRACE], [1], [Glibc backtrace]) backtrace_ok=yes - ]) - ;; - esac - if test "$backtrace_ok" = "no"; then - AC_CHECK_HEADER([execinfo.h], [ - AC_SEARCH_LIBS([backtrace], [execinfo], [ - AC_DEFINE([HAVE_GLIBC_BACKTRACE], [1], [Glibc backtrace]) - backtrace_ok=yes - ],, [-lm]) - ]) - fi + ],, [-lm]) + ]) fi if test "$enable_backtrace" = "yes" -a "$backtrace_ok" = "no"; then |