*: Rename thread.[ch] to event.[ch]

This is a first in a series of commits, whose goal is to rename
the thread system in FRR to an event system.  There is a continual
problem where people are confusing `struct thread` with a true
pthread.  In reality, our entire thread.c is an event system.

In this commit rename the thread.[ch] files to event.[ch].

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2022-02-28 10:40:31 -05:00
parent 173786f6b5
commit cb37cb336a
232 changed files with 235 additions and 236 deletions

View File

@ -8,7 +8,7 @@ Copyright 2011 by Matthieu Boutier and Juliusz Chroboczek
#include "getopt.h"
#include "if.h"
#include "log.h"
#include "thread.h"
#include "event.h"
#include "privs.h"
#include "sigevent.h"
#include "lib/version.h"

View File

@ -29,7 +29,7 @@ Copyright 2011, 2012 by Matthieu Boutier and Juliusz Chroboczek
#include "command.h"
#include "vty.h"
#include "memory.h"
#include "thread.h"
#include "event.h"
#include "nexthop.h"
#include "util.h"

View File

@ -26,7 +26,7 @@
#include "lib/network.h"
#include "lib/printfrr.h"
#include "lib/stream.h"
#include "lib/thread.h"
#include "lib/event.h"
#include "bfd.h"
#include "bfddp_packet.h"

View File

@ -9,7 +9,7 @@
#include "memory.h"
#include "prefix.h"
#include "hash.h"
#include "thread.h"
#include "event.h"
#include "queue.h"
#include "filter.h"

View File

@ -11,7 +11,7 @@
#include "linklist.h"
#include "memory.h"
#include "prefix.h"
#include "thread.h"
#include "event.h"
#include "buffer.h"
#include "stream.h"
#include "vrf.h"

View File

@ -11,7 +11,7 @@
#include "sockunion.h"
#include "command.h"
#include "prefix.h"
#include "thread.h"
#include "event.h"
#include "linklist.h"
#include "queue.h"
#include "pullwr.h"

View File

@ -10,7 +10,7 @@
#include "memory.h"
#include "command.h"
#include "log.h"
#include "thread.h"
#include "event.h"
#include "queue.h"
#include "filter.h"

View File

@ -10,7 +10,7 @@
#include "sockunion.h"
#include "command.h"
#include "prefix.h"
#include "thread.h"
#include "event.h"
#include "linklist.h"
#include "queue.h"
#include "memory.h"

View File

@ -9,7 +9,7 @@
#include "linklist.h"
#include "prefix.h"
#include "sockunion.h"
#include "thread.h"
#include "event.h"
#include "log.h"
#include "stream.h"
#include "ringbuf.h"

View File

@ -17,7 +17,7 @@
#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 "thread.h" // for THREAD_OFF, THREAD_ARG, thread...
#include "event.h" // for THREAD_OFF, THREAD_ARG, thread...
#include "bgpd/bgp_io.h"
#include "bgpd/bgp_debug.h" // for bgp_debug_neighbor_events, bgp_type_str

View File

@ -6,7 +6,7 @@
#include <zebra.h>
#include "command.h"
#include "thread.h"
#include "event.h"
#include "prefix.h"
#include "zclient.h"
#include "stream.h"

View File

@ -9,7 +9,7 @@
#include "vector.h"
#include "command.h"
#include "getopt.h"
#include "thread.h"
#include "event.h"
#include <lib/version.h>
#include "memory.h"
#include "prefix.h"

View File

@ -12,7 +12,7 @@
#include "log.h"
#include "prefix.h"
#include "command.h"
#include "thread.h"
#include "event.h"
#include "smux.h"
#include "filter.h"
#include "hook.h"

View File

@ -5,7 +5,7 @@
#include <zebra.h>
#include "thread.h"
#include "event.h"
#include "sockunion.h"
#include "sockopt.h"
#include "memory.h"

View File

@ -6,7 +6,7 @@
#include <zebra.h>
#include "command.h"
#include "thread.h"
#include "event.h"
#include "prefix.h"
#include "lib/json.h"
#include "zclient.h"

View File

@ -6,7 +6,7 @@
#include <zebra.h>
#include "command.h"
#include "thread.h"
#include "event.h"
#include "prefix.h"
#include "zclient.h"
#include "stream.h"

View File

@ -8,7 +8,7 @@
#include "linklist.h"
#include "prefix.h"
#include "stream.h"
#include "thread.h"
#include "event.h"
#include "log.h"
#include "command.h"
#include "memory.h"

View File

@ -8,7 +8,7 @@
#include <zebra.h>
#include <sys/time.h>
#include "thread.h"
#include "event.h"
#include "stream.h"
#include "network.h"
#include "prefix.h"

View File

@ -20,7 +20,7 @@
#include "buffer.h"
#include "sockunion.h"
#include "plist.h"
#include "thread.h"
#include "event.h"
#include "workqueue.h"
#include "queue.h"
#include "memory.h"

View File

@ -23,7 +23,7 @@
#include "command.h"
#include "linklist.h"
#include "memory.h"
#include "thread.h"
#include "event.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_table.h"
@ -36,7 +36,6 @@
#include "northbound_cli.h"
#include "lib/network.h"
#include "lib/thread.h"
#include "rtrlib/rtrlib.h"
#include "hook.h"
#include "libfrr.h"

View File

@ -12,7 +12,7 @@
#include "log.h"
#include "prefix.h"
#include "command.h"
#include "thread.h"
#include "event.h"
#include "smux.h"
#include "filter.h"
#include "hook.h"

View File

@ -12,7 +12,7 @@
#include "log.h"
#include "prefix.h"
#include "command.h"
#include "thread.h"
#include "event.h"
#include "smux.h"
#include "filter.h"
#include "hook.h"

View File

@ -13,7 +13,7 @@
#include "log.h"
#include "prefix.h"
#include "command.h"
#include "thread.h"
#include "event.h"
#include "smux.h"
#include "filter.h"
#include "hook.h"

View File

@ -12,7 +12,7 @@
#include <zebra.h>
#include "prefix.h"
#include "thread.h"
#include "event.h"
#include "buffer.h"
#include "stream.h"
#include "command.h"

View File

@ -17,7 +17,7 @@
#include "memory.h"
#include "prefix.h"
#include "hash.h"
#include "thread.h"
#include "event.h"
#include "queue.h"
#include "routemap.h"
#include "filter.h"

View File

@ -12,7 +12,7 @@
#include <zebra.h>
#include "prefix.h"
#include "thread.h"
#include "event.h"
#include "buffer.h"
#include "stream.h"
#include "command.h"

View File

@ -16,7 +16,7 @@
#include "buffer.h"
#include "linklist.h"
#include "stream.h"
#include "thread.h"
#include "event.h"
#include "log.h"
#include "memory.h"
#include "lib_vty.h"

View File

@ -13,7 +13,7 @@
#include "sockunion.h"
#include "zclient.h"
#include "routemap.h"
#include "thread.h"
#include "event.h"
#include "queue.h"
#include "memory.h"
#include "lib/json.h"

View File

@ -6,7 +6,7 @@
#include <zebra.h>
#include "prefix.h"
#include "thread.h"
#include "event.h"
#include "buffer.h"
#include "stream.h"
#include "ringbuf.h"

View File

@ -15,7 +15,7 @@
#include "lib/memory.h"
#include "lib/log.h"
#include "lib/skiplist.h"
#include "lib/thread.h"
#include "event.h"
#include "lib/stream.h"
#include "lib/lib_errors.h"

View File

@ -13,7 +13,7 @@
#ifndef QUAGGA_HGP_RFAPI_IMPORT_H
#define QUAGGA_HGP_RFAPI_IMPORT_H
#include "lib/thread.h"
#include "event.h"
/*
* These are per-rt-import-list

View File

@ -9,7 +9,7 @@
#define _QUAGGA_VNC_VNC_EXPORT_TABLE_H_
#include "lib/table.h"
#include "lib/thread.h"
#include "event.h"
#include "lib/vty.h"
#include "bgpd/bgpd.h"

View File

@ -56,7 +56,7 @@ Basic boilerplate:
#include "hook.h"
#include "module.h"
#include "libfrr.h"
#include "thread.h"
#include "event.h"
static int module_late_init(struct thread_master *master)
{

View File

@ -57,7 +57,7 @@ execute. At initialization, a daemon will typically create one
fetch each task and execute it.
These tasks have various types corresponding to their general action. The types
are given by integer macros in :file:`thread.h` and are:
are given by integer macros in :file:`event.h` and are:
``THREAD_READ``
Task which waits for a file descriptor to become ready for reading and then
@ -144,7 +144,7 @@ macros wrap underlying functions in :file:`thread.c` to provide additional
information added at compile time, such as the line number the task was
scheduled from, that can be accessed at runtime for debugging, logging and
informational purposes. Each task type has its own specific scheduling function
that follow the naming convention ``thread_add_<type>``; see :file:`thread.h`
that follow the naming convention ``thread_add_<type>``; see :file:`event.h`
for details.
There are some gotchas to keep in mind:

View File

@ -13,7 +13,7 @@
#include <zebra.h>
#include "linklist.h"
#include "thread.h"
#include "event.h"
#include "prefix.h"
#include "command.h"
#include "stream.h"

View File

@ -21,7 +21,7 @@
#include "command.h"
#include "prefix.h"
#include "table.h"
#include "thread.h"
#include "event.h"
#include "memory.h"
#include "log.h"
#include "stream.h"

View File

@ -53,8 +53,8 @@
*/
#include <zebra.h>
#include <thread.h>
#include "event.h"
#include "prefix.h"
#include "table.h"
#include "memory.h"

View File

@ -16,7 +16,7 @@
#include <zebra.h>
#include "thread.h"
#include "event.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"

View File

@ -16,7 +16,7 @@
#include <zebra.h>
#include "thread.h"
#include "event.h"
#include "linklist.h"
#include "prefix.h"
#include "if.h"

View File

@ -17,7 +17,7 @@
#include <lib/version.h>
#include "getopt.h"
#include "thread.h"
#include "event.h"
#include "prefix.h"
#include "linklist.h"
#include "if.h"

View File

@ -20,7 +20,7 @@
#include "prefix.h"
#include "memory.h"
#include "command.h"
#include "thread.h"
#include "event.h"
#include "stream.h"
#include "table.h"
#include "log.h"

View File

@ -12,7 +12,7 @@
#include <zebra.h>
#include "thread.h"
#include "event.h"
#include "linklist.h"
#include "prefix.h"
#include "if.h"

View File

@ -12,7 +12,7 @@
#include <zebra.h>
#include "thread.h"
#include "event.h"
#include "memory.h"
#include "linklist.h"
#include "vty.h"

View File

@ -12,7 +12,7 @@
#include <zebra.h>
#include "thread.h"
#include "event.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"

View File

@ -16,7 +16,7 @@
#include <zebra.h>
#include "thread.h"
#include "event.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"

View File

@ -12,7 +12,7 @@
#include <zebra.h>
#include "thread.h"
#include "event.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"

View File

@ -11,7 +11,7 @@
*/
#include <zebra.h>
#include "thread.h"
#include "event.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"

View File

@ -16,7 +16,7 @@
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include "thread.h"
#include "event.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"

View File

@ -16,7 +16,7 @@
#include <zebra.h>
#include "thread.h"
#include "event.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"

View File

@ -17,7 +17,7 @@
#include <zebra.h>
#include "memory.h"
#include "thread.h"
#include "event.h"
#include "prefix.h"
#include "table.h"
#include "vty.h"

View File

@ -12,7 +12,7 @@
#include <zebra.h>
#include "thread.h"
#include "event.h"
#include "command.h"
#include "network.h"
#include "prefix.h"

View File

@ -12,7 +12,7 @@
#include <zebra.h>
#include "thread.h"
#include "event.h"
#include "vty.h"
#include "command.h"
#include "linklist.h"

View File

@ -157,7 +157,7 @@ document walk_route_table
Walk through a routing table (or subset thereof) and dump all the non-null
(struct route_node *)->info pointers.
Argument: A lib/thread.h::(struct route_node *) pointing to the route_node
Argument: A lib/hread.h::(struct route_node *) pointing to the route_node
under which all data should be dumped
end

View File

@ -15,7 +15,7 @@
#include "hash.h"
#include "vty.h"
#include "linklist.h"
#include "thread.h"
#include "event.h"
#include "if.h"
#include "stream.h"
#include "bfd.h"

View File

@ -19,7 +19,7 @@
#include "if.h"
#include "linklist.h"
#include "command.h"
#include "thread.h"
#include "event.h"
#include "vty.h"
#include "hash.h"
#include "prefix.h"

View File

@ -14,7 +14,7 @@
#include "if.h"
#include "linklist.h"
#include "command.h"
#include "thread.h"
#include "event.h"
#include "hash.h"
#include "prefix.h"
#include "stream.h"

View File

@ -13,7 +13,7 @@
#include "log.h"
#include "hash.h"
#include "thread.h"
#include "event.h"
#include "linklist.h"
#include "vty.h"
#include "stream.h"

View File

@ -16,7 +16,7 @@
#include "stream.h"
#include "command.h"
#include "if.h"
#include "thread.h"
#include "event.h"
#include "isisd/isis_constants.h"
#include "isisd/isis_common.h"

View File

@ -13,7 +13,7 @@
#include "if.h"
#include "linklist.h"
#include "command.h"
#include "thread.h"
#include "event.h"
#include "hash.h"
#include "prefix.h"
#include "stream.h"

View File

@ -9,7 +9,7 @@
#include "monotime.h"
#include "memory.h"
#include "thread.h"
#include "event.h"
#include "prefix.h"
#include "table.h"
#include "vty.h"

View File

@ -12,7 +12,7 @@
#include <zebra.h>
#include "linklist.h"
#include "thread.h"
#include "event.h"
#include "vty.h"
#include "stream.h"
#include "memory.h"

View File

@ -10,7 +10,7 @@
#include <zebra.h>
#include "getopt.h"
#include "thread.h"
#include "event.h"
#include "log.h"
#include <lib/version.h>
#include "command.h"

View File

@ -11,7 +11,7 @@
#include <zebra.h>
#include "memory.h"
#include "thread.h"
#include "event.h"
#include "linklist.h"
#include "log.h"
#include "stream.h"

View File

@ -11,7 +11,7 @@
#include <zebra.h>
#include "thread.h"
#include "event.h"
#include "linklist.h"
#include "vty.h"
#include "log.h"

View File

@ -18,7 +18,7 @@
#include "plist.h"
#include "routemap.h"
#include "table.h"
#include "thread.h"
#include "event.h"
#include "vty.h"
#include "isis_constants.h"

View File

@ -11,7 +11,7 @@
#include <zebra.h>
#include "thread.h"
#include "event.h"
#include "linklist.h"
#include "vty.h"
#include "log.h"

View File

@ -13,7 +13,7 @@
#include <math.h>
#include "linklist.h"
#include "thread.h"
#include "event.h"
#include "vty.h"
#include "stream.h"
#include "memory.h"

View File

@ -10,7 +10,7 @@
#include <zebra.h>
#include "thread.h"
#include "event.h"
#include "command.h"
#include "memory.h"
#include "log.h"

View File

@ -9,7 +9,7 @@
#include <zebra.h>
#include "thread.h"
#include "event.h"
#include "vty.h"
#include "command.h"
#include "log.h"

View File

@ -14,7 +14,7 @@
#include "queue.h"
#include "openbsd-tree.h"
#include "imsg.h"
#include "thread.h"
#include "event.h"
#include "qobj.h"
#include "prefix.h"
#include "filter.h"

View File

@ -10,7 +10,7 @@
#include "command.h"
#include "memory.h"
#include "prefix.h"
#include "thread.h"
#include "event.h"
#include "stream.h"
#include "vrf.h"
#include "zclient.h"

View File

@ -17,7 +17,7 @@
#include "memory.h"
#include "log.h"
#include "log_vty.h"
#include "thread.h"
#include "event.h"
#include "vector.h"
#include "linklist.h"
#include "vty.h"

View File

@ -8,7 +8,7 @@
#include <zebra.h>
#include <sys/resource.h>
#include "thread.h"
#include "event.h"
#include "memory.h"
#include "frrcu.h"
#include "log.h"
@ -87,7 +87,7 @@ unsigned long cputime_threshold = CONSUMED_TIME_CHECK;
unsigned long walltime_threshold = CONSUMED_TIME_CHECK;
/* CLI start ---------------------------------------------------------------- */
#include "lib/thread_clippy.c"
#include "lib/event_clippy.c"
static unsigned int cpu_record_hash_key(const struct cpu_thread_history *a)
{

View File

@ -11,7 +11,7 @@
#include "frratomic.h"
#include "memory.h"
#include "frrcu.h"
#include "thread.h"
#include "event.h"
#ifdef __cplusplus
extern "C" {

View File

@ -15,7 +15,7 @@
#include <zebra.h>
#include <zmq.h>
#include "thread.h"
#include "event.h"
#include "memory.h"
#include "frr_zmq.h"
#include "log.h"

View File

@ -7,7 +7,7 @@
#ifndef _FRRZMQ_H
#define _FRRZMQ_H
#include "thread.h"
#include "event.h"
#include <zmq.h>
#ifdef __cplusplus

View File

@ -10,7 +10,7 @@
#include "memory.h"
#include "prefix.h"
#include "log.h"
#include "thread.h"
#include "event.h"
#include "stream.h"
#include "zclient.h"
#include "table.h"

View File

@ -11,7 +11,7 @@
#include "typesafe.h"
#include "sigevent.h"
#include "privs.h"
#include "thread.h"
#include "event.h"
#include "log.h"
#include "getopt.h"
#include "module.h"

View File

@ -21,7 +21,7 @@
#include <lttng/tracepoint.h>
#include "hash.h"
#include "thread.h"
#include "event.h"
#include "memory.h"
#include "linklist.h"
#include "table.h"

View File

@ -13,7 +13,7 @@ extern "C" {
#endif
#include "mgmt_pb.h"
#include "thread.h"
#include "event.h"
#include "mgmtd/mgmt_defines.h"
/***************************************************************

View File

@ -10,7 +10,7 @@
#include "network.h"
#include "sockopt.h"
#include "stream.h"
#include "thread.h"
#include "event.h"
#include "mgmt_msg.h"

View File

@ -8,7 +8,7 @@
#define _MGMT_MSG_H
#include "stream.h"
#include "thread.h"
#include "event.h"
#define MGMT_MSG_MARKER (0x4D724B21u) /* ASCII - "MrK!"*/

View File

@ -7,7 +7,7 @@
#ifndef _FRR_NORTHBOUND_H_
#define _FRR_NORTHBOUND_H_
#include "thread.h"
#include "event.h"
#include "hook.h"
#include "linklist.h"
#include "openbsd-tree.h"

View File

@ -12,7 +12,7 @@
#include "log.h"
#include "libfrr.h"
#include "lib/version.h"
#include "lib/thread.h"
#include "event.h"
#include "command.h"
#include "lib_errors.h"
#include "northbound.h"

View File

@ -10,7 +10,7 @@
#include <stdbool.h>
#include <stdint.h>
#include "thread.h"
#include "event.h"
#include "stream.h"
#ifdef __cplusplus

View File

@ -7,7 +7,7 @@
#include <zebra.h>
#include "thread.h"
#include "event.h"
#include "memory.h"
#include "hash.h"
#include "log.h"

View File

@ -12,7 +12,7 @@
#include "typesafe.h"
#include "jhash.h"
#include "thread.h"
#include "event.h"
#include "lib_errors.h"
#include "resolver.h"
#include "command.h"

View File

@ -6,7 +6,7 @@
#ifndef _FRR_RESOLVER_H
#define _FRR_RESOLVER_H
#include "thread.h"
#include "event.h"
#include "sockunion.h"
#ifdef __cplusplus

View File

@ -8,7 +8,7 @@
#ifndef _FRR_SIGNAL_H
#define _FRR_SIGNAL_H
#include <thread.h>
#include <event.h>
#ifdef __cplusplus
extern "C" {

View File

@ -9,7 +9,7 @@
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include <net-snmp/agent/snmp_vars.h>
#include "thread.h"
#include "event.h"
#include "hook.h"
#ifdef __cplusplus

View File

@ -17,7 +17,7 @@
#include "command.h"
#include "memory.h"
#include "thread.h"
#include "event.h"
#include "vty.h"
DEFINE_MTYPE_STATIC(LIB, SPF_BACKOFF, "SPF backoff");

View File

@ -108,7 +108,7 @@ lib_libfrr_la_SOURCES = \
lib/systemd.c \
lib/table.c \
lib/termtable.c \
lib/thread.c \
lib/event.c \
lib/typerb.c \
lib/typesafe.c \
lib/vector.c \
@ -181,7 +181,7 @@ clippy_scan += \
lib/plist.c \
lib/routemap.c \
lib/routemap_cli.c \
lib/thread.c \
lib/event.c \
lib/vty.c \
lib/zlog_5424_cli.c \
# end
@ -288,7 +288,7 @@ pkginclude_HEADERS += \
lib/systemd.h \
lib/table.h \
lib/termtable.h \
lib/thread.h \
lib/event.h \
lib/trace.h \
lib/typerb.h \
lib/typesafe.h \

View File

@ -7,7 +7,7 @@
#include <zebra.h>
#include <sys/un.h>
#include "thread.h"
#include "event.h"
#include "systemd.h"
#include "lib_errors.h"

View File

@ -22,7 +22,7 @@
#include <stdio.h>
#include "linklist.h"
#include "thread.h"
#include "event.h"
#include "buffer.h"
#include "command.h"
#include "sockunion.h"

View File

@ -18,7 +18,7 @@
#include <regex.h>
#endif /* HAVE_LIBPCRE2_POSIX */
#include "thread.h"
#include "event.h"
#include "log.h"
#include "sockunion.h"
#include "qobj.h"

View File

@ -6,7 +6,7 @@
*/
#include "zebra.h"
#include "linklist.h"
#include "thread.h"
#include "event.h"
#include "memory.h"
#include "wheel.h"
#include "log.h"

View File

@ -6,7 +6,7 @@
*/
#include <zebra.h>
#include "thread.h"
#include "event.h"
#include "memory.h"
#include "workqueue.h"
#include "linklist.h"

View File

@ -14,7 +14,7 @@
#include "vrf_int.h"
#include "if.h"
#include "log.h"
#include "thread.h"
#include "event.h"
#include "zclient.h"
#include "memory.h"
#include "table.h"

View File

@ -48,7 +48,7 @@
#include "frrcu.h"
#include "zlog.h"
#include "libfrr_trace.h"
#include "thread.h"
#include "event.h"
DEFINE_MTYPE_STATIC(LIB, LOG_MESSAGE, "log message");
DEFINE_MTYPE_STATIC(LIB, LOG_TLSBUF, "log thread-local buffer");

Some files were not shown because too many files have changed in this diff Show More