#include "getopt.h"
#include "if.h"
#include "log.h"
-#include "event.h"
+#include "frrevent.h"
#include "privs.h"
#include "sigevent.h"
#include "lib/version.h"
#include "command.h"
#include "vty.h"
#include "memory.h"
-#include "event.h"
+#include "frrevent.h"
#include "nexthop.h"
#include "util.h"
#include "lib/network.h"
#include "lib/printfrr.h"
#include "lib/stream.h"
-#include "lib/event.h"
+#include "lib/frrevent.h"
#include "bfd.h"
#include "bfddp_packet.h"
#include "memory.h"
#include "prefix.h"
#include "hash.h"
-#include "event.h"
+#include "frrevent.h"
#include "queue.h"
#include "filter.h"
#include "linklist.h"
#include "memory.h"
#include "prefix.h"
-#include "event.h"
+#include "frrevent.h"
#include "buffer.h"
#include "stream.h"
#include "vrf.h"
#include "sockunion.h"
#include "command.h"
#include "prefix.h"
-#include "event.h"
+#include "frrevent.h"
#include "linklist.h"
#include "queue.h"
#include "pullwr.h"
#include "memory.h"
#include "command.h"
#include "log.h"
-#include "event.h"
+#include "frrevent.h"
#include "queue.h"
#include "filter.h"
#include "sockunion.h"
#include "command.h"
#include "prefix.h"
-#include "event.h"
+#include "frrevent.h"
#include "linklist.h"
#include "queue.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"
#include "sockunion.h"
-#include "event.h"
+#include "frrevent.h"
#include "log.h"
#include "stream.h"
#include "ringbuf.h"
#include "network.h" // for ERRNO_IO_RETRY
#include "stream.h" // for stream_get_endp, stream_getw_from, str...
#include "ringbuf.h" // for ringbuf_remain, ringbuf_peek, ringbuf_...
-#include "event.h" // for EVENT_OFF, EVENT_ARG, thread...
+#include "frrevent.h" // for EVENT_OFF, EVENT_ARG, thread...
#include "bgpd/bgp_io.h"
#include "bgpd/bgp_debug.h" // for bgp_debug_neighbor_events, bgp_type_str
#include <zebra.h>
#include "command.h"
-#include "event.h"
+#include "frrevent.h"
#include "prefix.h"
#include "zclient.h"
#include "stream.h"
#include "vector.h"
#include "command.h"
#include "getopt.h"
-#include "event.h"
+#include "frrevent.h"
#include <lib/version.h>
#include "memory.h"
#include "prefix.h"
#include "log.h"
#include "prefix.h"
#include "command.h"
-#include "event.h"
+#include "frrevent.h"
#include "smux.h"
#include "filter.h"
#include "hook.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "sockunion.h"
#include "sockopt.h"
#include "memory.h"
#include <zebra.h>
#include "command.h"
-#include "event.h"
+#include "frrevent.h"
#include "prefix.h"
#include "lib/json.h"
#include "zclient.h"
#include <zebra.h>
#include "command.h"
-#include "event.h"
+#include "frrevent.h"
#include "prefix.h"
#include "zclient.h"
#include "stream.h"
#include "linklist.h"
#include "prefix.h"
#include "stream.h"
-#include "event.h"
+#include "frrevent.h"
#include "log.h"
#include "command.h"
#include "memory.h"
#include <zebra.h>
#include <sys/time.h>
-#include "event.h"
+#include "frrevent.h"
#include "stream.h"
#include "network.h"
#include "prefix.h"
#include "buffer.h"
#include "sockunion.h"
#include "plist.h"
-#include "event.h"
+#include "frrevent.h"
#include "workqueue.h"
#include "queue.h"
#include "memory.h"
#include "command.h"
#include "linklist.h"
#include "memory.h"
-#include "event.h"
+#include "frrevent.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_table.h"
#include "log.h"
#include "prefix.h"
#include "command.h"
-#include "event.h"
+#include "frrevent.h"
#include "smux.h"
#include "filter.h"
#include "hook.h"
#include "log.h"
#include "prefix.h"
#include "command.h"
-#include "event.h"
+#include "frrevent.h"
#include "smux.h"
#include "filter.h"
#include "hook.h"
#include "log.h"
#include "prefix.h"
#include "command.h"
-#include "event.h"
+#include "frrevent.h"
#include "smux.h"
#include "filter.h"
#include "hook.h"
#include <zebra.h>
#include "prefix.h"
-#include "event.h"
+#include "frrevent.h"
#include "buffer.h"
#include "stream.h"
#include "command.h"
#include "memory.h"
#include "prefix.h"
#include "hash.h"
-#include "event.h"
+#include "frrevent.h"
#include "queue.h"
#include "routemap.h"
#include "filter.h"
#include <zebra.h>
#include "prefix.h"
-#include "event.h"
+#include "frrevent.h"
#include "buffer.h"
#include "stream.h"
#include "command.h"
#include "buffer.h"
#include "linklist.h"
#include "stream.h"
-#include "event.h"
+#include "frrevent.h"
#include "log.h"
#include "memory.h"
#include "lib_vty.h"
#include "sockunion.h"
#include "zclient.h"
#include "routemap.h"
-#include "event.h"
+#include "frrevent.h"
#include "queue.h"
#include "memory.h"
#include "lib/json.h"
#include <zebra.h>
#include "prefix.h"
-#include "event.h"
+#include "frrevent.h"
#include "buffer.h"
#include "stream.h"
#include "ringbuf.h"
#include "lib/memory.h"
#include "lib/log.h"
#include "lib/skiplist.h"
-#include "event.h"
+#include "frrevent.h"
#include "lib/stream.h"
#include "lib/lib_errors.h"
#ifndef QUAGGA_HGP_RFAPI_IMPORT_H
#define QUAGGA_HGP_RFAPI_IMPORT_H
-#include "event.h"
+#include "frrevent.h"
/*
* These are per-rt-import-list
#define _QUAGGA_VNC_VNC_EXPORT_TABLE_H_
#include "lib/table.h"
-#include "event.h"
+#include "frrevent.h"
#include "lib/vty.h"
#include "bgpd/bgpd.h"
#include "hook.h"
#include "module.h"
#include "libfrr.h"
- #include "event.h"
+ #include "frrevent.h"
static int module_late_init(struct event_loop *master)
{
#include <zebra.h>
#include "linklist.h"
-#include "event.h"
+#include "frrevent.h"
#include "prefix.h"
#include "command.h"
#include "stream.h"
#include "command.h"
#include "prefix.h"
#include "table.h"
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "log.h"
#include "stream.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "prefix.h"
#include "table.h"
#include "memory.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "linklist.h"
#include "prefix.h"
#include "if.h"
#include <lib/version.h>
#include "getopt.h"
-#include "event.h"
+#include "frrevent.h"
#include "prefix.h"
#include "linklist.h"
#include "if.h"
#include "prefix.h"
#include "memory.h"
#include "command.h"
-#include "event.h"
+#include "frrevent.h"
#include "stream.h"
#include "table.h"
#include "log.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "linklist.h"
#include "prefix.h"
#include "if.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "linklist.h"
#include "vty.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"
*/
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"
#include <zebra.h>
#include "memory.h"
-#include "event.h"
+#include "frrevent.h"
#include "prefix.h"
#include "table.h"
#include "vty.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "command.h"
#include "network.h"
#include "prefix.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "vty.h"
#include "command.h"
#include "linklist.h"
#include "hash.h"
#include "vty.h"
#include "linklist.h"
-#include "event.h"
+#include "frrevent.h"
#include "if.h"
#include "stream.h"
#include "bfd.h"
#include "if.h"
#include "linklist.h"
#include "command.h"
-#include "event.h"
+#include "frrevent.h"
#include "vty.h"
#include "hash.h"
#include "prefix.h"
#include "if.h"
#include "linklist.h"
#include "command.h"
-#include "event.h"
+#include "frrevent.h"
#include "hash.h"
#include "prefix.h"
#include "stream.h"
#include "log.h"
#include "hash.h"
-#include "event.h"
+#include "frrevent.h"
#include "linklist.h"
#include "vty.h"
#include "stream.h"
#include "stream.h"
#include "command.h"
#include "if.h"
-#include "event.h"
+#include "frrevent.h"
#include "isisd/isis_constants.h"
#include "isisd/isis_common.h"
#include "if.h"
#include "linklist.h"
#include "command.h"
-#include "event.h"
+#include "frrevent.h"
#include "hash.h"
#include "prefix.h"
#include "stream.h"
#include "monotime.h"
#include "memory.h"
-#include "event.h"
+#include "frrevent.h"
#include "prefix.h"
#include "table.h"
#include "vty.h"
#include <zebra.h>
#include "linklist.h"
-#include "event.h"
+#include "frrevent.h"
#include "vty.h"
#include "stream.h"
#include "memory.h"
#include <zebra.h>
#include "getopt.h"
-#include "event.h"
+#include "frrevent.h"
#include "log.h"
#include <lib/version.h>
#include "command.h"
#include <zebra.h>
#include "memory.h"
-#include "event.h"
+#include "frrevent.h"
#include "linklist.h"
#include "log.h"
#include "stream.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "linklist.h"
#include "vty.h"
#include "log.h"
#include "plist.h"
#include "routemap.h"
#include "table.h"
-#include "event.h"
+#include "frrevent.h"
#include "vty.h"
#include "isis_constants.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "linklist.h"
#include "vty.h"
#include "log.h"
#include <math.h>
#include "linklist.h"
-#include "event.h"
+#include "frrevent.h"
#include "vty.h"
#include "stream.h"
#include "memory.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "command.h"
#include "memory.h"
#include "log.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "vty.h"
#include "command.h"
#include "log.h"
#include "queue.h"
#include "openbsd-tree.h"
#include "imsg.h"
-#include "event.h"
+#include "frrevent.h"
#include "qobj.h"
#include "prefix.h"
#include "filter.h"
#include "command.h"
#include "memory.h"
#include "prefix.h"
-#include "event.h"
+#include "frrevent.h"
#include "stream.h"
#include "vrf.h"
#include "zclient.h"
#include "memory.h"
#include "log.h"
#include "log_vty.h"
-#include "event.h"
+#include "frrevent.h"
#include "vector.h"
#include "linklist.h"
#include "vty.h"
#include <zebra.h>
#include <sys/resource.h>
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "frrcu.h"
#include "log.h"
+++ /dev/null
-// SPDX-License-Identifier: GPL-2.0-or-later
-/* Event management routine header.
- * Copyright (C) 1998 Kunihiro Ishiguro
- */
-
-#ifndef _ZEBRA_THREAD_H
-#define _ZEBRA_THREAD_H
-
-#include <zebra.h>
-#include <pthread.h>
-#include <poll.h>
-#include "monotime.h"
-#include "frratomic.h"
-#include "typesafe.h"
-#include "xref.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern bool cputime_enabled;
-extern unsigned long cputime_threshold;
-/* capturing wallclock time is always enabled since it is fast (reading
- * hardware TSC w/o syscalls)
- */
-extern unsigned long walltime_threshold;
-
-struct rusage_t {
-#ifdef HAVE_CLOCK_THREAD_CPUTIME_ID
- struct timespec cpu;
-#else
- struct rusage cpu;
-#endif
- struct timeval real;
-};
-#define RUSAGE_T struct rusage_t
-
-#define GETRUSAGE(X) event_getrusage(X)
-
-PREDECL_LIST(event_list);
-PREDECL_HEAP(event_timer_list);
-
-struct fd_handler {
- /* number of pfd that fit in the allocated space of pfds. This is a
- * constant and is the same for both pfds and copy.
- */
- nfds_t pfdsize;
-
- /* file descriptors to monitor for i/o */
- struct pollfd *pfds;
- /* number of pollfds stored in pfds */
- nfds_t pfdcount;
-
- /* chunk used for temp copy of pollfds */
- struct pollfd *copy;
- /* number of pollfds stored in copy */
- nfds_t copycount;
-};
-
-struct xref_eventsched {
- struct xref xref;
-
- const char *funcname;
- const char *dest;
- uint32_t event_type;
-};
-
-/* Master of the theads. */
-struct event_loop {
- char *name;
-
- struct event **read;
- struct event **write;
- struct event_timer_list_head timer;
- struct event_list_head event, ready, unuse;
- struct list *cancel_req;
- bool canceled;
- pthread_cond_t cancel_cond;
- struct hash *cpu_record;
- int io_pipe[2];
- int fd_limit;
- struct fd_handler handler;
- unsigned long alloc;
- long selectpoll_timeout;
- bool spin;
- bool handle_signals;
- pthread_mutex_t mtx;
- pthread_t owner;
-
- bool ready_run_loop;
- RUSAGE_T last_getrusage;
-};
-
-/* Event types. */
-enum event_types {
- EVENT_READ,
- EVENT_WRITE,
- EVENT_TIMER,
- EVENT_EVENT,
- EVENT_READY,
- EVENT_UNUSED,
- EVENT_EXECUTE,
-};
-
-/* Event itself. */
-struct event {
- enum event_types type; /* event type */
- enum event_types add_type; /* event type */
- struct event_list_item eventitem;
- struct event_timer_list_item timeritem;
- struct event **ref; /* external reference (if given) */
- struct event_loop *master; /* pointer to the struct event_loop */
- void (*func)(struct event *); /* event function */
- void *arg; /* event argument */
- union {
- int val; /* second argument of the event. */
- int fd; /* file descriptor in case of r/w */
- struct timeval sands; /* rest of time sands value. */
- } u;
- struct timeval real;
- struct cpu_event_history *hist; /* cache pointer to cpu_history */
- unsigned long yield; /* yield time in microseconds */
- const struct xref_eventsched *xref; /* origin location */
- pthread_mutex_t mtx; /* mutex for thread.c functions */
- bool ignore_timer_late;
-};
-
-#ifdef _FRR_ATTRIBUTE_PRINTFRR
-#pragma FRR printfrr_ext "%pTH"(struct event *)
-#endif
-
-struct cpu_event_history {
- void (*func)(struct event *);
- atomic_size_t total_cpu_warn;
- atomic_size_t total_wall_warn;
- atomic_size_t total_starv_warn;
- atomic_size_t total_calls;
- atomic_size_t total_active;
- struct time_stats {
- atomic_size_t total, max;
- } real;
- struct time_stats cpu;
- atomic_uint_fast32_t types;
- const char *funcname;
-};
-
-/* Struct timeval's tv_usec one second value. */
-#define TIMER_SECOND_MICRO 1000000L
-
-/* Event yield time. */
-#define EVENT_YIELD_TIME_SLOT 10 * 1000L /* 10ms */
-
-#define EVENT_TIMER_STRLEN 12
-
-/* Macros. */
-#define EVENT_ARG(X) ((X)->arg)
-#define EVENT_FD(X) ((X)->u.fd)
-#define EVENT_VAL(X) ((X)->u.val)
-
-/*
- * Please consider this macro deprecated, and do not use it in new code.
- */
-#define EVENT_OFF(thread) \
- do { \
- if ((thread)) \
- event_cancel(&(thread)); \
- } while (0)
-
-/*
- * Macro wrappers to generate xrefs for all thread add calls. Includes
- * file/line/function info for debugging/tracing.
- */
-#include "lib/xref.h"
-
-#define _xref_t_a(addfn, type, m, f, a, v, t) \
- ({ \
- static const struct xref_eventsched _xref __attribute__( \
- (used)) = { \
- .xref = XREF_INIT(XREFT_EVENTSCHED, NULL, __func__), \
- .funcname = #f, \
- .dest = #t, \
- .event_type = EVENT_##type, \
- }; \
- XREF_LINK(_xref.xref); \
- _event_add_##addfn(&_xref, m, f, a, v, t); \
- }) /* end */
-
-#define event_add_read(m, f, a, v, t) _xref_t_a(read_write, READ, m, f, a, v, t)
-#define event_add_write(m, f, a, v, t) \
- _xref_t_a(read_write, WRITE, m, f, a, v, t)
-#define event_add_timer(m, f, a, v, t) _xref_t_a(timer, TIMER, m, f, a, v, t)
-#define event_add_timer_msec(m, f, a, v, t) \
- _xref_t_a(timer_msec, TIMER, m, f, a, v, t)
-#define event_add_timer_tv(m, f, a, v, t) \
- _xref_t_a(timer_tv, TIMER, m, f, a, v, t)
-#define event_add_event(m, f, a, v, t) _xref_t_a(event, EVENT, m, f, a, v, t)
-
-#define event_execute(m, f, a, v) \
- ({ \
- static const struct xref_eventsched _xref __attribute__( \
- (used)) = { \
- .xref = XREF_INIT(XREFT_EVENTSCHED, NULL, __func__), \
- .funcname = #f, \
- .dest = NULL, \
- .event_type = EVENT_EXECUTE, \
- }; \
- XREF_LINK(_xref.xref); \
- _event_execute(&_xref, m, f, a, v); \
- }) /* end */
-
-/* Prototypes. */
-extern struct event_loop *event_master_create(const char *name);
-void event_master_set_name(struct event_loop *master, const char *name);
-extern void event_master_free(struct event_loop *m);
-extern void event_master_free_unused(struct event_loop *m);
-
-extern void _event_add_read_write(const struct xref_eventsched *xref,
- struct event_loop *master,
- void (*fn)(struct event *), void *arg, int fd,
- struct event **tref);
-
-extern void _event_add_timer(const struct xref_eventsched *xref,
- struct event_loop *master,
- void (*fn)(struct event *), void *arg, long t,
- struct event **tref);
-
-extern void _event_add_timer_msec(const struct xref_eventsched *xref,
- struct event_loop *master,
- void (*fn)(struct event *), void *arg, long t,
- struct event **tref);
-
-extern void _event_add_timer_tv(const struct xref_eventsched *xref,
- struct event_loop *master,
- void (*fn)(struct event *), void *arg,
- struct timeval *tv, struct event **tref);
-
-extern void _event_add_event(const struct xref_eventsched *xref,
- struct event_loop *master,
- void (*fn)(struct event *), void *arg, int val,
- struct event **tref);
-
-extern void _event_execute(const struct xref_eventsched *xref,
- struct event_loop *master,
- void (*fn)(struct event *), void *arg, int val);
-
-extern void event_cancel(struct event **event);
-extern void event_cancel_async(struct event_loop *m, struct event **eptr,
- void *data);
-/* Cancel ready tasks with an arg matching 'arg' */
-extern void event_cancel_event_ready(struct event_loop *m, void *arg);
-/* Cancel all tasks with an arg matching 'arg', including timers and io */
-extern void event_cancel_event(struct event_loop *m, void *arg);
-extern struct event *event_fetch(struct event_loop *m, struct event *event);
-extern void event_call(struct event *event);
-extern unsigned long event_timer_remain_second(struct event *event);
-extern struct timeval event_timer_remain(struct event *event);
-extern unsigned long event_timer_remain_msec(struct event *event);
-extern int event_should_yield(struct event *event);
-/* set yield time for thread */
-extern void event_set_yield_time(struct event *event, unsigned long ytime);
-
-/* Internal libfrr exports */
-extern void event_getrusage(RUSAGE_T *r);
-extern void event_cmd_init(void);
-
-/* Returns elapsed real (wall clock) time. */
-extern unsigned long event_consumed_time(RUSAGE_T *after, RUSAGE_T *before,
- unsigned long *cpu_time_elapsed);
-
-/* only for use in logging functions! */
-extern pthread_key_t thread_current;
-extern char *event_timer_to_hhmmss(char *buf, int buf_size,
- struct event *t_timer);
-
-static inline bool event_is_scheduled(struct event *thread)
-{
- if (thread)
- return true;
-
- return false;
-}
-
-/* Debug signal mask */
-void debug_signals(const sigset_t *sigs);
-
-static inline void event_ignore_late_timer(struct event *event)
-{
- event->ignore_timer_late = true;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ZEBRA_THREAD_H */
#include "frratomic.h"
#include "memory.h"
#include "frrcu.h"
-#include "event.h"
+#include "frrevent.h"
#ifdef __cplusplus
extern "C" {
#include <zebra.h>
#include <zmq.h>
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "frr_zmq.h"
#include "log.h"
#ifndef _FRRZMQ_H
#define _FRRZMQ_H
-#include "event.h"
+#include "frrevent.h"
#include <zmq.h>
#ifdef __cplusplus
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0-or-later
+/* Event management routine header.
+ * Copyright (C) 1998 Kunihiro Ishiguro
+ */
+
+#ifndef _ZEBRA_THREAD_H
+#define _ZEBRA_THREAD_H
+
+#include <zebra.h>
+#include <pthread.h>
+#include <poll.h>
+#include "monotime.h"
+#include "frratomic.h"
+#include "typesafe.h"
+#include "xref.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern bool cputime_enabled;
+extern unsigned long cputime_threshold;
+/* capturing wallclock time is always enabled since it is fast (reading
+ * hardware TSC w/o syscalls)
+ */
+extern unsigned long walltime_threshold;
+
+struct rusage_t {
+#ifdef HAVE_CLOCK_THREAD_CPUTIME_ID
+ struct timespec cpu;
+#else
+ struct rusage cpu;
+#endif
+ struct timeval real;
+};
+#define RUSAGE_T struct rusage_t
+
+#define GETRUSAGE(X) event_getrusage(X)
+
+PREDECL_LIST(event_list);
+PREDECL_HEAP(event_timer_list);
+
+struct fd_handler {
+ /* number of pfd that fit in the allocated space of pfds. This is a
+ * constant and is the same for both pfds and copy.
+ */
+ nfds_t pfdsize;
+
+ /* file descriptors to monitor for i/o */
+ struct pollfd *pfds;
+ /* number of pollfds stored in pfds */
+ nfds_t pfdcount;
+
+ /* chunk used for temp copy of pollfds */
+ struct pollfd *copy;
+ /* number of pollfds stored in copy */
+ nfds_t copycount;
+};
+
+struct xref_eventsched {
+ struct xref xref;
+
+ const char *funcname;
+ const char *dest;
+ uint32_t event_type;
+};
+
+/* Master of the theads. */
+struct event_loop {
+ char *name;
+
+ struct event **read;
+ struct event **write;
+ struct event_timer_list_head timer;
+ struct event_list_head event, ready, unuse;
+ struct list *cancel_req;
+ bool canceled;
+ pthread_cond_t cancel_cond;
+ struct hash *cpu_record;
+ int io_pipe[2];
+ int fd_limit;
+ struct fd_handler handler;
+ unsigned long alloc;
+ long selectpoll_timeout;
+ bool spin;
+ bool handle_signals;
+ pthread_mutex_t mtx;
+ pthread_t owner;
+
+ bool ready_run_loop;
+ RUSAGE_T last_getrusage;
+};
+
+/* Event types. */
+enum event_types {
+ EVENT_READ,
+ EVENT_WRITE,
+ EVENT_TIMER,
+ EVENT_EVENT,
+ EVENT_READY,
+ EVENT_UNUSED,
+ EVENT_EXECUTE,
+};
+
+/* Event itself. */
+struct event {
+ enum event_types type; /* event type */
+ enum event_types add_type; /* event type */
+ struct event_list_item eventitem;
+ struct event_timer_list_item timeritem;
+ struct event **ref; /* external reference (if given) */
+ struct event_loop *master; /* pointer to the struct event_loop */
+ void (*func)(struct event *); /* event function */
+ void *arg; /* event argument */
+ union {
+ int val; /* second argument of the event. */
+ int fd; /* file descriptor in case of r/w */
+ struct timeval sands; /* rest of time sands value. */
+ } u;
+ struct timeval real;
+ struct cpu_event_history *hist; /* cache pointer to cpu_history */
+ unsigned long yield; /* yield time in microseconds */
+ const struct xref_eventsched *xref; /* origin location */
+ pthread_mutex_t mtx; /* mutex for thread.c functions */
+ bool ignore_timer_late;
+};
+
+#ifdef _FRR_ATTRIBUTE_PRINTFRR
+#pragma FRR printfrr_ext "%pTH"(struct event *)
+#endif
+
+struct cpu_event_history {
+ void (*func)(struct event *);
+ atomic_size_t total_cpu_warn;
+ atomic_size_t total_wall_warn;
+ atomic_size_t total_starv_warn;
+ atomic_size_t total_calls;
+ atomic_size_t total_active;
+ struct time_stats {
+ atomic_size_t total, max;
+ } real;
+ struct time_stats cpu;
+ atomic_uint_fast32_t types;
+ const char *funcname;
+};
+
+/* Struct timeval's tv_usec one second value. */
+#define TIMER_SECOND_MICRO 1000000L
+
+/* Event yield time. */
+#define EVENT_YIELD_TIME_SLOT 10 * 1000L /* 10ms */
+
+#define EVENT_TIMER_STRLEN 12
+
+/* Macros. */
+#define EVENT_ARG(X) ((X)->arg)
+#define EVENT_FD(X) ((X)->u.fd)
+#define EVENT_VAL(X) ((X)->u.val)
+
+/*
+ * Please consider this macro deprecated, and do not use it in new code.
+ */
+#define EVENT_OFF(thread) \
+ do { \
+ if ((thread)) \
+ event_cancel(&(thread)); \
+ } while (0)
+
+/*
+ * Macro wrappers to generate xrefs for all thread add calls. Includes
+ * file/line/function info for debugging/tracing.
+ */
+#include "lib/xref.h"
+
+#define _xref_t_a(addfn, type, m, f, a, v, t) \
+ ({ \
+ static const struct xref_eventsched _xref __attribute__( \
+ (used)) = { \
+ .xref = XREF_INIT(XREFT_EVENTSCHED, NULL, __func__), \
+ .funcname = #f, \
+ .dest = #t, \
+ .event_type = EVENT_##type, \
+ }; \
+ XREF_LINK(_xref.xref); \
+ _event_add_##addfn(&_xref, m, f, a, v, t); \
+ }) /* end */
+
+#define event_add_read(m, f, a, v, t) _xref_t_a(read_write, READ, m, f, a, v, t)
+#define event_add_write(m, f, a, v, t) \
+ _xref_t_a(read_write, WRITE, m, f, a, v, t)
+#define event_add_timer(m, f, a, v, t) _xref_t_a(timer, TIMER, m, f, a, v, t)
+#define event_add_timer_msec(m, f, a, v, t) \
+ _xref_t_a(timer_msec, TIMER, m, f, a, v, t)
+#define event_add_timer_tv(m, f, a, v, t) \
+ _xref_t_a(timer_tv, TIMER, m, f, a, v, t)
+#define event_add_event(m, f, a, v, t) _xref_t_a(event, EVENT, m, f, a, v, t)
+
+#define event_execute(m, f, a, v) \
+ ({ \
+ static const struct xref_eventsched _xref __attribute__( \
+ (used)) = { \
+ .xref = XREF_INIT(XREFT_EVENTSCHED, NULL, __func__), \
+ .funcname = #f, \
+ .dest = NULL, \
+ .event_type = EVENT_EXECUTE, \
+ }; \
+ XREF_LINK(_xref.xref); \
+ _event_execute(&_xref, m, f, a, v); \
+ }) /* end */
+
+/* Prototypes. */
+extern struct event_loop *event_master_create(const char *name);
+void event_master_set_name(struct event_loop *master, const char *name);
+extern void event_master_free(struct event_loop *m);
+extern void event_master_free_unused(struct event_loop *m);
+
+extern void _event_add_read_write(const struct xref_eventsched *xref,
+ struct event_loop *master,
+ void (*fn)(struct event *), void *arg, int fd,
+ struct event **tref);
+
+extern void _event_add_timer(const struct xref_eventsched *xref,
+ struct event_loop *master,
+ void (*fn)(struct event *), void *arg, long t,
+ struct event **tref);
+
+extern void _event_add_timer_msec(const struct xref_eventsched *xref,
+ struct event_loop *master,
+ void (*fn)(struct event *), void *arg, long t,
+ struct event **tref);
+
+extern void _event_add_timer_tv(const struct xref_eventsched *xref,
+ struct event_loop *master,
+ void (*fn)(struct event *), void *arg,
+ struct timeval *tv, struct event **tref);
+
+extern void _event_add_event(const struct xref_eventsched *xref,
+ struct event_loop *master,
+ void (*fn)(struct event *), void *arg, int val,
+ struct event **tref);
+
+extern void _event_execute(const struct xref_eventsched *xref,
+ struct event_loop *master,
+ void (*fn)(struct event *), void *arg, int val);
+
+extern void event_cancel(struct event **event);
+extern void event_cancel_async(struct event_loop *m, struct event **eptr,
+ void *data);
+/* Cancel ready tasks with an arg matching 'arg' */
+extern void event_cancel_event_ready(struct event_loop *m, void *arg);
+/* Cancel all tasks with an arg matching 'arg', including timers and io */
+extern void event_cancel_event(struct event_loop *m, void *arg);
+extern struct event *event_fetch(struct event_loop *m, struct event *event);
+extern void event_call(struct event *event);
+extern unsigned long event_timer_remain_second(struct event *event);
+extern struct timeval event_timer_remain(struct event *event);
+extern unsigned long event_timer_remain_msec(struct event *event);
+extern int event_should_yield(struct event *event);
+/* set yield time for thread */
+extern void event_set_yield_time(struct event *event, unsigned long ytime);
+
+/* Internal libfrr exports */
+extern void event_getrusage(RUSAGE_T *r);
+extern void event_cmd_init(void);
+
+/* Returns elapsed real (wall clock) time. */
+extern unsigned long event_consumed_time(RUSAGE_T *after, RUSAGE_T *before,
+ unsigned long *cpu_time_elapsed);
+
+/* only for use in logging functions! */
+extern pthread_key_t thread_current;
+extern char *event_timer_to_hhmmss(char *buf, int buf_size,
+ struct event *t_timer);
+
+static inline bool event_is_scheduled(struct event *thread)
+{
+ if (thread)
+ return true;
+
+ return false;
+}
+
+/* Debug signal mask */
+void debug_signals(const sigset_t *sigs);
+
+static inline void event_ignore_late_timer(struct event *event)
+{
+ event->ignore_timer_late = true;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ZEBRA_THREAD_H */
#include "memory.h"
#include "prefix.h"
#include "log.h"
-#include "event.h"
+#include "frrevent.h"
#include "stream.h"
#include "zclient.h"
#include "table.h"
#include "typesafe.h"
#include "sigevent.h"
#include "privs.h"
-#include "event.h"
+#include "frrevent.h"
#include "log.h"
#include "getopt.h"
#include "module.h"
#include <lttng/tracepoint.h>
#include "hash.h"
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "linklist.h"
#include "table.h"
#endif
#include "mgmt_pb.h"
-#include "event.h"
+#include "frrevent.h"
#include "mgmtd/mgmt_defines.h"
/***************************************************************
#include "network.h"
#include "sockopt.h"
#include "stream.h"
-#include "event.h"
+#include "frrevent.h"
#include "mgmt_msg.h"
#define _MGMT_MSG_H
#include "stream.h"
-#include "event.h"
+#include "frrevent.h"
#define MGMT_MSG_MARKER (0x4D724B21u) /* ASCII - "MrK!"*/
#ifndef _FRR_NORTHBOUND_H_
#define _FRR_NORTHBOUND_H_
-#include "event.h"
+#include "frrevent.h"
#include "hook.h"
#include "linklist.h"
#include "openbsd-tree.h"
#include "log.h"
#include "libfrr.h"
#include "lib/version.h"
-#include "event.h"
+#include "frrevent.h"
#include "command.h"
#include "lib_errors.h"
#include "northbound.h"
#include <stdbool.h>
#include <stdint.h>
-#include "event.h"
+#include "frrevent.h"
#include "stream.h"
#ifdef __cplusplus
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "hash.h"
#include "log.h"
#include "typesafe.h"
#include "jhash.h"
-#include "event.h"
+#include "frrevent.h"
#include "lib_errors.h"
#include "resolver.h"
#include "command.h"
#ifndef _FRR_RESOLVER_H
#define _FRR_RESOLVER_H
-#include "event.h"
+#include "frrevent.h"
#include "sockunion.h"
#ifdef __cplusplus
#ifndef _FRR_SIGNAL_H
#define _FRR_SIGNAL_H
-#include <event.h>
+#include <frrevent.h>
#ifdef __cplusplus
extern "C" {
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include <net-snmp/agent/snmp_vars.h>
-#include "event.h"
+#include "frrevent.h"
#include "hook.h"
#ifdef __cplusplus
#include "command.h"
#include "memory.h"
-#include "event.h"
+#include "frrevent.h"
#include "vty.h"
DEFINE_MTYPE_STATIC(LIB, SPF_BACKOFF, "SPF backoff");
lib/systemd.h \
lib/table.h \
lib/termtable.h \
- lib/event.h \
+ lib/frrevent.h \
lib/trace.h \
lib/typerb.h \
lib/typesafe.h \
#include <zebra.h>
#include <sys/un.h>
-#include "event.h"
+#include "frrevent.h"
#include "systemd.h"
#include "lib_errors.h"
#include <stdio.h>
#include "linklist.h"
-#include "event.h"
+#include "frrevent.h"
#include "buffer.h"
#include "command.h"
#include "sockunion.h"
#include <regex.h>
#endif /* HAVE_LIBPCRE2_POSIX */
-#include "event.h"
+#include "frrevent.h"
#include "log.h"
#include "sockunion.h"
#include "qobj.h"
*/
#include "zebra.h"
#include "linklist.h"
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "wheel.h"
#include "log.h"
*/
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "workqueue.h"
#include "linklist.h"
#include "vrf_int.h"
#include "if.h"
#include "log.h"
-#include "event.h"
+#include "frrevent.h"
#include "zclient.h"
#include "memory.h"
#include "table.h"
#include "frrcu.h"
#include "zlog.h"
#include "libfrr_trace.h"
-#include "event.h"
+#include "frrevent.h"
DEFINE_MTYPE_STATIC(LIB, LOG_MESSAGE, "log message");
DEFINE_MTYPE_STATIC(LIB, LOG_TLSBUF, "log thread-local buffer");
#include "frr_pthread.h"
#include "command.h"
#include "monotime.h"
-#include "event.h"
+#include "frrevent.h"
#include "lib/version.h"
#include "lib/lib_errors.h"
*/
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "sockopt.h"
#include "network.h"
#include "libfrr.h"
#include <zebra.h>
#include "md5.h"
-#include "event.h"
+#include "frrevent.h"
#include "xref.h"
#include "mgmt_fe_client.h"
#include <linux/neighbour.h>
#include <linux/netfilter/nfnetlink_log.h>
-#include "event.h"
+#include "frrevent.h"
#include "stream.h"
#include "prefix.h"
#include "nhrpd.h"
#include "zebra.h"
#include "memory.h"
-#include "event.h"
+#include "frrevent.h"
#include "hash.h"
#include "nhrpd.h"
#include <sys/socket.h>
#include <sys/un.h>
-#include "event.h"
+#include "frrevent.h"
#include "zbuf.h"
#include "log.h"
#include "nhrpd.h"
#include "zebra.h"
#include "linklist.h"
#include "memory.h"
-#include "event.h"
+#include "frrevent.h"
#include "nhrpd.h"
#include "os.h"
#include "zebra.h"
#include "privs.h"
#include "getopt.h"
-#include "event.h"
+#include "frrevent.h"
#include "sigevent.h"
#include "lib/version.h"
#include "log.h"
#include <sys/types.h>
#include <sys/socket.h>
-#include "event.h"
+#include "frrevent.h"
#include "nhrpd.h"
#include "netlink.h"
#include "znl.h"
#include "zebra.h"
#include "zbuf.h"
#include "memory.h"
-#include "event.h"
+#include "frrevent.h"
#include "nhrpd.h"
#include "nhrp_protocol.h"
#include <netinet/if_ether.h>
#include "nhrpd.h"
#include "zbuf.h"
-#include "event.h"
+#include "frrevent.h"
#include "hash.h"
#include "nhrp_protocol.h"
#include "zebra.h"
#include "memory.h"
-#include "event.h"
+#include "frrevent.h"
#include "hash.h"
#include "network.h"
#include "nhrpd.h"
#include "table.h"
#include "memory.h"
-#include "event.h"
+#include "frrevent.h"
#include "log.h"
#include "nhrp_protocol.h"
#include "memory.h"
#include "stream.h"
#include "hash.h"
-#include "event.h"
+#include "frrevent.h"
#include "jhash.h"
#include "nhrpd.h"
#include <sys/socket.h>
#include <sys/un.h>
-#include "event.h"
+#include "frrevent.h"
#include "zbuf.h"
#include "log.h"
#include "lib_errors.h"
#include "vty.h"
#include "linklist.h"
#include "command.h"
-#include "event.h"
+#include "frrevent.h"
#include "plist.h"
#include "filter.h"
#include "log.h"
#include "memory.h"
#include "linklist.h"
-#include "event.h"
+#include "frrevent.h"
#include "vty.h"
#include "command.h"
#include "if.h"
#include "routemap.h"
#include "table.h"
#include "plist.h"
-#include "event.h"
+#include "frrevent.h"
#include "linklist.h"
#include "lib/northbound_cli.h"
#include "linklist.h"
#include "memory.h"
#include "prefix.h"
-#include "event.h"
+#include "frrevent.h"
#include "buffer.h"
#include "stream.h"
#include "zclient.h"
#include <zebra.h>
#include "log.h"
-#include "event.h"
+#include "frrevent.h"
#include "linklist.h"
#include "vty.h"
#include "command.h"
#include "if.h"
#include "log.h"
#include "command.h"
-#include "event.h"
+#include "frrevent.h"
#include "prefix.h"
#include "plist.h"
#include "zclient.h"
#include "log.h"
#include "linklist.h"
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "if.h"
#include "prefix.h"
#include "vty.h"
#include "command.h"
#include "memory.h"
-#include "event.h"
+#include "frrevent.h"
#include "checksum.h"
#include "frrstr.h"
#include <stdlib.h>
#include "getopt.h"
-#include "event.h"
+#include "frrevent.h"
#include "log.h"
#include "command.h"
#include "vty.h"
#include "log.h"
#include "vty.h"
#include "command.h"
-#include "event.h"
+#include "frrevent.h"
#include "linklist.h"
#include "lib_errors.h"
#include "checksum.h"
#include "log.h"
#include "memory.h"
-#include "event.h"
+#include "frrevent.h"
#include "linklist.h"
#include "vty.h"
#include "command.h"
#include "vty.h"
#include "linklist.h"
#include "command.h"
-#include "event.h"
+#include "frrevent.h"
#include "plist.h"
#include "filter.h"
#include "vty.h"
#include "prefix.h"
#include "linklist.h"
-#include "event.h"
+#include "frrevent.h"
#include "lib_errors.h"
#include "ospf6_lsa.h"
#include "linklist.h"
#include "prefix.h"
#include "table.h"
-#include "event.h"
+#include "frrevent.h"
#include "command.h"
#include "defaults.h"
#include "lib/json.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "linklist.h"
#include "vty.h"
#include "command.h"
#define OSPF6D_H
#include "libospf.h"
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
DECLARE_MGROUP(OSPF6D);
#include <lib/version.h>
#include "getopt.h"
-#include "event.h"
+#include "frrevent.h"
#include "prefix.h"
#include "linklist.h"
#include "if.h"
free to use any thread library (like pthreads). */
#include "ospfd/ospf_dump.h" /* for ospf_lsa_header_dump */
-#include "event.h"
+#include "frrevent.h"
#include "log.h"
/* Local portnumber for async channel. Note that OSPF API library will also
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"
#include "vty.h"
#include "stream.h"
#include "log.h"
-#include "event.h"
+#include "frrevent.h"
#include "hash.h"
#include "sockunion.h" /* for inet_aton() */
#include "buffer.h"
#include "vty.h"
#include "stream.h"
#include "log.h"
-#include "event.h"
+#include "frrevent.h"
#include "hash.h"
#include "sockunion.h" /* for inet_aton() */
#include "buffer.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "hash.h"
#include "linklist.h"
#include "linklist.h"
#include "memory.h"
#include "prefix.h"
-#include "event.h"
+#include "frrevent.h"
#include "buffer.h"
#include "stream.h"
#include "zclient.h"
#include "lib/bfd.h"
#include "monotime.h"
#include "linklist.h"
-#include "event.h"
+#include "frrevent.h"
#include "prefix.h"
#include "command.h"
#include "stream.h"
#include "vty.h"
#include "stream.h"
#include "log.h"
-#include "event.h"
+#include "frrevent.h"
#include "hash.h"
#include "sockunion.h" /* for inet_aton() */
#include "network.h"
#include "if.h"
#include "command.h"
#include "table.h"
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "log.h"
#include "zclient.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "hash.h"
#include "linklist.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "linklist.h"
#include "prefix.h"
#include "if.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "linklist.h"
#include "prefix.h"
#include "if.h"
#include "monotime.h"
#include "memory.h"
-#include "event.h"
+#include "frrevent.h"
#include "prefix.h"
#include "table.h"
#include "vty.h"
#include "memory.h"
#include "stream.h"
#include "log.h"
-#include "event.h"
+#include "frrevent.h"
#include "hash.h"
#include "sockunion.h" /* for inet_aton() */
#include "checksum.h"
#include <lib/version.h>
#include "bfd.h"
#include "getopt.h"
-#include "event.h"
+#include "frrevent.h"
#include "prefix.h"
#include "linklist.h"
#include "if.h"
#include "prefix.h"
#include "memory.h"
#include "command.h"
-#include "event.h"
+#include "frrevent.h"
#include "stream.h"
#include "table.h"
#include "log.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "linklist.h"
#include "prefix.h"
#include "if.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "hash.h"
#include "linklist.h"
#include "vty.h"
#include "stream.h"
#include "log.h"
-#include "event.h"
+#include "frrevent.h"
#include "hash.h"
#include "sockunion.h" /* for inet_aton() */
#include "printfrr.h"
#include <zebra.h>
#include "monotime.h"
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"
#include "vty.h"
#include "stream.h"
#include "log.h"
-#include "event.h"
+#include "frrevent.h"
#include "hash.h"
#include "sockunion.h" /* for inet_aton() */
#include "mpls.h"
#include <zebra.h>
#include "monotime.h"
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "hash.h"
#include "linklist.h"
#include "sockunion.h" /* for inet_aton() */
#include "stream.h"
#include "table.h"
-#include "event.h"
+#include "frrevent.h"
#include "vty.h"
#include "zclient.h"
#include "sbuf.h"
#include "vty.h"
#include "stream.h"
#include "log.h"
-#include "event.h"
+#include "frrevent.h"
#include "hash.h"
#include "sockunion.h" /* for inet_aton() */
#include "network.h"
#include "printfrr.h"
#include "monotime.h"
#include "memory.h"
-#include "event.h"
+#include "frrevent.h"
#include "prefix.h"
#include "table.h"
#include "vty.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "command.h"
#include "network.h"
#include "prefix.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "vty.h"
#include "command.h"
#include "linklist.h"
#include <lib/version.h>
#include "getopt.h"
-#include "event.h"
+#include "frrevent.h"
#include "command.h"
#include "log.h"
#include "memory.h"
#include "pathd/path_pcep.h"
#include "pathd/path_pcep_config.h"
#include "pathd/path_pcep_debug.h"
-#include "event.h"
+#include "frrevent.h"
#define MAX_XPATH 256
#define MAX_FLOAT_LEN 22
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "log.h"
#include "lib_errors.h"
#include "if.h"
#include <lib/version.h>
#include "getopt.h"
-#include "event.h"
+#include "frrevent.h"
#include "prefix.h"
#include "linklist.h"
#include "if.h"
*/
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "linklist.h"
#include "prefix.h"
#include "table.h"
*/
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "command.h"
#include "network.h"
#include "prefix.h"
#include "lib/jhash.h"
#include "lib/prefix.h"
#include "lib/checksum.h"
-#include "lib/event.h"
+#include "lib/frrevent.h"
#include "termtable.h"
#include "pimd/pim6_mld.h"
#include <zebra.h>
#include "linklist.h"
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "if.h"
#include "vrf.h"
#include "lib/version.h"
#include <getopt.h>
#include "command.h"
-#include "event.h"
+#include "frrevent.h"
#include <signal.h>
#include "memory.h"
#include <lib/prefix.h>
#include <lib/sockunion.h>
#include <lib/stream.h>
-#include <event.h>
+#include <frrevent.h>
#include <lib/vty.h>
#include <lib/plist.h>
#include <lib/lib_errors.h>
#include <lib/log.h>
#include <lib/network.h>
#include <lib/stream.h>
-#include "event.h"
+#include "frrevent.h"
#include <lib/vty.h>
#include <lib/lib_errors.h>
#include <lib/log.h>
#include <lib/network.h>
#include <lib/sockunion.h>
-#include "event.h"
+#include "frrevent.h"
#include <lib/vty.h>
#include <lib/if.h>
#include <lib/vrf.h>
#include <zebra.h>
#include "log.h"
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "if.h"
#include "network.h"
#include "log.h"
#include "if.h"
-#include "event.h"
+#include "frrevent.h"
#include "prefix.h"
#include "vty.h"
#include "plist.h"
#include <time.h>
#include "log.h"
-#include "event.h"
+#include "frrevent.h"
#include "lib_errors.h"
#include "pim_time.h"
#include <stdint.h>
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
int64_t pim_time_monotonic_sec(void);
int64_t pim_time_monotonic_dsec(void);
#include "log.h"
#include "zclient.h"
#include "memory.h"
-#include "event.h"
+#include "frrevent.h"
#include "linklist.h"
#include "vty.h"
#include "plist.h"
#include "zclient.h"
#include "stream.h"
#include "network.h"
-#include "event.h"
+#include "frrevent.h"
#include "prefix.h"
#include "vty.h"
#include "lib_errors.h"
#include "table.h"
#include "log.h"
#include "stream.h"
-#include "event.h"
+#include "frrevent.h"
#include "zclient.h"
#include "filter.h"
#include "sockopt.h"
#include <lib/version.h>
#include "getopt.h"
-#include "event.h"
+#include "frrevent.h"
#include "command.h"
#include "memory.h"
#include "prefix.h"
#include "prefix.h"
#include "command.h"
#include "linklist.h"
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "ripd/ripd.h"
#include "command.h"
#include "prefix.h"
#include "table.h"
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "log.h"
#include "stream.h"
#include "zclient.h"
#include "command.h"
#include "agg_table.h"
-#include "event.h"
+#include "frrevent.h"
#include "privs.h"
#include "vrf.h"
#include "lib_errors.h"
#include "vty.h"
#include "command.h"
#include "memory.h"
-#include "event.h"
+#include "frrevent.h"
#include "log.h"
#include "prefix.h"
#include "if.h"
#include "prefix.h"
#include "command.h"
#include "linklist.h"
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "ripngd/ripngd.h"
#include "prefix.h"
#include "filter.h"
#include "log.h"
-#include "event.h"
+#include "frrevent.h"
#include "memory.h"
#include "if.h"
#include "stream.h"
#include "prefix.h"
#include "nexthop.h"
#include "log.h"
-#include "event.h"
+#include "frrevent.h"
#include "vrf.h"
#include "zclient.h"
#include "frr_pthread.h"
#include <lib/version.h>
#include "getopt.h"
-#include "event.h"
+#include "frrevent.h"
#include "prefix.h"
#include "linklist.h"
#include "if.h"
*/
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "command.h"
#include "network.h"
#include "prefix.h"
#include <lib/version.h>
#include "getopt.h"
-#include "event.h"
+#include "frrevent.h"
#include "command.h"
#include "log.h"
#include "memory.h"
*/
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "command.h"
#include "network.h"
#include "prefix.h"
#include <lib/version.h>
#include "getopt.h"
-#include "event.h"
+#include "frrevent.h"
#include "vty.h"
#include "command.h"
#include "memory.h"
#include "memory.h"
#include "sbuf.h"
#include "stream.h"
-#include "event.h"
+#include "frrevent.h"
#include "isisd/isis_circuit.h"
#include "isisd/isis_tlvs.h"
#include <lib/version.h>
#include "getopt.h"
-#include "event.h"
+#include "frrevent.h"
#include "vty.h"
#include "command.h"
#include "log.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "vty.h"
#include "command.h"
#include "memory.h"
#include "lib/stream.h"
#include "lib/table.h"
#include "lib/termtable.h"
-#include "event.h"
+#include "frrevent.h"
#include "lib/typesafe.h"
#include "lib/typerb.h"
#include "lib/vector.h"
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "vty.h"
#include "command.h"
#include "memory.h"
#include <zebra.h>
#include "lib/zlog.h"
-#include "event.h"
+#include "frrevent.h"
#include "lib/sigevent.h"
int main(int argc, char **argv)
#include "libfrr.h"
#include "routing_nb.h"
#include "northbound_cli.h"
-#include "event.h"
+#include "frrevent.h"
#include "vrf.h"
#include "vty.h"
*/
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "vty.h"
#include "command.h"
#include "memory.h"
#include <zebra.h>
#include <math.h>
-#include "event.h"
+#include "frrevent.h"
#include "vty.h"
#include "command.h"
#include "memory.h"
*/
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include "vty.h"
#include "command.h"
#include "memory.h"
#include <zebra.h>
#include <stream.h>
-#include "event.h"
+#include "frrevent.h"
#include "printfrr.h"
#include "memory.h"
#include "prng.h"
-#include "event.h"
+#include "frrevent.h"
#define SCHEDULE_TIMERS 800
#define REMOVE_TIMERS 200
#include <stdio.h>
#include <unistd.h>
-#include "event.h"
+#include "frrevent.h"
#include "prng.h"
#define SCHEDULE_TIMERS 1000000
#include <zebra.h>
#include "getopt.h"
-#include "event.h"
+#include "frrevent.h"
#include <lib/version.h>
#include "vty.h"
#include "command.h"
#include "lib/northbound.h"
#include "lib/privs.h"
#include "lib/stream.h"
-#include "lib/event.h"
+#include "lib/frrevent.h"
#include "lib/vty.h"
/* Global definitions */
#include "lib/nexthop.h"
#include "lib/privs.h"
#include "lib/sigevent.h"
-#include "lib/event.h"
+#include "lib/frrevent.h"
#include "lib/vrf.h"
#include "lib/vty.h"
*/
#include <zebra.h>
-#include "event.h"
+#include "frrevent.h"
#include <log.h>
#include <network.h>
#include <sigevent.h>
#include "table.h"
#include "memory.h"
#include "rib.h"
-#include "event.h"
+#include "frrevent.h"
#include "privs.h"
#include "nexthop.h"
#include "vrf.h"
#include "connected.h"
#include "log.h"
#include "zclient.h"
-#include "event.h"
+#include "frrevent.h"
#include "lib_errors.h"
#include "zebra/interface.h"
#include "zebra/rtadv.h"
#include "connected.h"
#include "log.h"
#include "zclient.h"
-#include "event.h"
+#include "frrevent.h"
#include "privs.h"
#include "libfrr.h"
#include "lib_errors.h"
#include "sockunion.h"
#include "sockunion.h"
#include "stream.h"
-#include "event.h"
+#include "frrevent.h"
#include "vty.h"
#include "zclient.h"
#include "lib_errors.h"
#include "table.h"
#include "memory.h"
#include "rib.h"
-#include "event.h"
+#include "frrevent.h"
#include "privs.h"
#include "nexthop.h"
#include "vrf.h"
}
-#include "event.h"
+#include "frrevent.h"
#include "zebra/zserv.h"
/* For debug purpose. */
#include <stdint.h>
#include "lib/linklist.h"
-#include "event.h"
+#include "frrevent.h"
#include "lib/hook.h"
#include "zebra/zserv.h"
#include <lib/version.h>
#include "getopt.h"
#include "command.h"
-#include "event.h"
+#include "frrevent.h"
#include "filter.h"
#include "memory.h"
#include "prefix.h"
#include "table.h"
#include "memory.h"
#include "rib.h"
-#include "event.h"
+#include "frrevent.h"
#include "privs.h"
#include "nexthop.h"
#include "vrf.h"
#include "memory.h"
#include "sockopt.h"
-#include "event.h"
+#include "frrevent.h"
#include "if.h"
#include "stream.h"
#include "log.h"
#include <stdint.h>
#include "lib/linklist.h"
-#include "event.h"
+#include "frrevent.h"
#include "lib/ns.h"
#include "zebra/zserv.h"
#include "log.h"
#include "libfrr.h"
#include "stream.h"
-#include "event.h"
+#include "frrevent.h"
#include "network.h"
#include "command.h"
#include "lib/version.h"
#include "lib/prefix.h"
#include "lib/command.h"
#include "lib/if.h"
-#include "event.h"
+#include "frrevent.h"
#include "lib/stream.h"
#include "lib/memory.h"
#include "lib/table.h"
#include "hook.h"
#include "module.h"
-#include "event.h"
+#include "frrevent.h"
#include "frr_pthread.h"
#include "libfrr.h"
#include "lib/version.h"
#include "log.h"
#include "sockunion.h"
#include "linklist.h"
-#include "event.h"
+#include "frrevent.h"
#include "workqueue.h"
#include "prefix.h"
#include "routemap.h"
#include <sys/inotify.h>
#include <sys/stat.h>
-#include "event.h"
+#include "frrevent.h"
#include "ns.h"
#include "command.h"
#include "memory.h"
#include "log.h"
#include "memory.h"
-#include "event.h"
+#include "frrevent.h"
#include "command.h"
#include "vrf.h"
#include "lib/json.h"
#include "sockunion.h"
#include "srcdest_table.h"
#include "table.h"
-#include "event.h"
+#include "frrevent.h"
#include "vrf.h"
#include "workqueue.h"
#include "nexthop_group_private.h"
#include "log.h"
#include "sockunion.h"
#include "linklist.h"
-#include "event.h"
+#include "frrevent.h"
#include "workqueue.h"
#include "prefix.h"
#include "routemap.h"
#include "lib/sockopt.h" /* for setsockopt_so_recvbuf, setsockopt... */
#include "lib/sockunion.h" /* for sockopt_reuseaddr, sockopt_reuseport */
#include "lib/stream.h" /* for STREAM_SIZE, stream (ptr only), ... */
-#include "event.h" /* for thread (ptr only), EVENT_ARG, ... */
+#include "frrevent.h" /* for thread (ptr only), EVENT_ARG, ... */
#include "lib/vrf.h" /* for vrf_info_lookup, VRF_DEFAULT */
#include "lib/vty.h" /* for vty_out, vty (ptr only) */
#include "lib/zclient.h" /* for zmsghdr, ZEBRA_HEADER_SIZE, ZEBRA... */
#include "lib/vrf.h" /* for vrf_bitmap_t */
#include "lib/zclient.h" /* for redist_proto */
#include "lib/stream.h" /* for stream, stream_fifo */
-#include "event.h" /* for thread, thread_master */
+#include "frrevent.h" /* for thread, thread_master */
#include "lib/linklist.h" /* for list */
#include "lib/workqueue.h" /* for work_queue */
#include "lib/hook.h" /* for DECLARE_HOOK, DECLARE_KOOH */