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(
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;
}
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);
}
#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"
dmalloc_debug(0x2f03d00);
#endif
- resource_sys_init();
+ times_update();
parse_args(argc, argv);
log_switch(1, NULL, NULL);