From: Maria Matejka Date: Mon, 18 Jul 2022 09:11:46 +0000 (+0200) Subject: Merge commit 'a4451535' into thread-next X-Git-Tag: v3.0-alpha1~171^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b6f5ee8709b2fae9da13c58bfbae21b84cd40c5;p=thirdparty%2Fbird.git Merge commit 'a4451535' into thread-next --- 4b6f5ee8709b2fae9da13c58bfbae21b84cd40c5 diff --cc aclocal.m4 index 58c487917,3405b85bc..cc45b54a2 --- a/aclocal.m4 +++ b/aclocal.m4 @@@ -1,32 -1,7 +1,33 @@@ dnl ** Additional Autoconf tests for BIRD configure script dnl ** (c) 1999 Martin Mares + dnl ** (c) 2021 Maria Matejka +AC_DEFUN([BIRD_CHECK_POINTER_ALIGNMENT], +[ + AC_CACHE_CHECK( + [how pointers are aligned], + [bird_cv_pointer_alignment], + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM( + [ + _Static_assert(_Alignof(void *) == 8, "bad"); + ], [] + ) + ], + [bird_cv_pointer_alignment=8], + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM( + [ + _Static_assert(_Alignof(void *) == 4, "bad"); + ], [] + ) + ], + [bird_cv_pointer_alignment=4], + [bird_cv_pointer_alignment=unknown] + )) + ) +]) + AC_DEFUN([BIRD_CHECK_THREAD_LOCAL], [ AC_CACHE_CHECK( diff --cc sysdep/unix/io.c index 810e782d9,90bb5d641..a3f1491af --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@@ -2060,11 -2022,11 +2043,11 @@@ io_update_time(void if (event_open) { - event_open->duration = last_time - event_open->timestamp; + event_open->duration = last_io_time - event_open->timestamp; if (event_open->duration > config->latency_limit) - log(L_WARN "Event 0x%p 0x%p took %d ms", - event_open->hook, event_open->data, (int) (event_open->duration TO_MS)); + log(L_WARN "Event 0x%p 0x%p took %u.%03u ms", + event_open->hook, event_open->data, (uint) (event_open->duration TO_MS), (uint) (event_open->duration % 1000)); event_open = NULL; } @@@ -2166,10 -2128,10 +2149,10 @@@ watchdog_stop(void watchdog_active = 0; } - btime duration = last_time - loop_time; + btime duration = last_io_time - loop_time; if (duration > config->watchdog_warning) - log(L_WARN "I/O loop cycle took %d ms for %d events", - (int) (duration TO_MS), event_log_num); + log(L_WARN "I/O loop cycle took %u.%03u ms for %d events", + (uint) (duration TO_MS), (uint) (duration % 1000), event_log_num); } diff --cc sysdep/unix/main.c index 07d6c691f,d35424fff..8bc07d94c --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@@ -28,9 -28,10 +28,10 @@@ #include "lib/resource.h" #include "lib/socket.h" #include "lib/event.h" + #include "lib/locking.h" #include "lib/timer.h" #include "lib/string.h" -#include "nest/route.h" +#include "nest/rt.h" #include "nest/protocol.h" #include "nest/iface.h" #include "nest/cli.h" @@@ -873,6 -903,8 +874,7 @@@ main(int argc, char **argv dmalloc_debug(0x2f03d00); #endif + times_update(); - resource_sys_init(); parse_args(argc, argv); log_switch(1, NULL, NULL);