]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Merge commit 'a4451535' into thread-next
authorMaria Matejka <mq@ucw.cz>
Mon, 18 Jul 2022 09:11:46 +0000 (11:11 +0200)
committerMaria Matejka <mq@ucw.cz>
Mon, 18 Jul 2022 09:11:46 +0000 (11:11 +0200)
1  2 
aclocal.m4
configure.ac
lib/birdlib.h
lib/lists.c
lib/timer.c
proto/bfd/io.c
sysdep/unix/Makefile
sysdep/unix/io.c
sysdep/unix/main.c

diff --cc aclocal.m4
index 58c48791724f30218ecbe14faf46bc245cfc6bd0,3405b85bc5a65c105ce114dd8b89517980e80368..cc45b54a2a68709ba63fbedc253ed4acf22451b3
@@@ -1,32 -1,7 +1,33 @@@
  dnl ** Additional Autoconf tests for BIRD configure script
  dnl ** (c) 1999 Martin Mares <mj@ucw.cz>
+ dnl ** (c) 2021 Maria Matejka <mq@jmq.cz>
  
 +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 configure.ac
Simple merge
diff --cc lib/birdlib.h
Simple merge
diff --cc lib/lists.c
Simple merge
diff --cc lib/timer.c
Simple merge
diff --cc proto/bfd/io.c
Simple merge
Simple merge
index 810e782d9be518e96aaf81e823b7e23fb6d91391,90bb5d641b1eec94e1d744632d9ae73077b2ece4..a3f1491af82bafb92203be5648627428ff7cda17
@@@ -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);
  }
  
  
index 07d6c691fe0921cd4f3e29cdedabba3846d6948d,d35424fff4346ac5b109469f037e1b688ae21be4..8bc07d94c7f6c2951207b9b2ab5d50c82194d08e
  #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
  
 -  resource_sys_init();
+   times_update();
    parse_args(argc, argv);
    log_switch(1, NULL, NULL);