Skip to content

Commit

Permalink
*: Rename thread.[ch] to event.[ch]
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
donaldsharp committed Mar 24, 2023
1 parent 173786f commit cb37cb3
Show file tree
Hide file tree
Showing 232 changed files with 235 additions and 236 deletions.
2 changes: 1 addition & 1 deletion babeld/babel_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion babeld/kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bfdd/dplane.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_advertise.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_bfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_bmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_damp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_label.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_mplsvpn_snmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_network.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <zebra.h>

#include "thread.h"
#include "event.h"
#include "sockunion.h"
#include "sockopt.h"
#include "memory.h"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_nexthop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_nht.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions bgpd/bgp_rpki.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_snmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_snmp_bgp4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_snmp_bgp4v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_updgrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_updgrp_adv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_updgrp_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_zebra.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/rfapi/rfapi_import.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion bgpd/rfapi/rfapi_import.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bgpd/rfapi/vnc_export_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion doc/developer/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions doc/developer/process-architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion eigrpd/eigrp_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion eigrpd/eigrp_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion eigrpd/eigrp_fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
*/

#include <zebra.h>
#include <thread.h>

#include "event.h"
#include "prefix.h"
#include "table.h"
#include "memory.h"
Expand Down
2 changes: 1 addition & 1 deletion eigrpd/eigrp_hello.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <zebra.h>

#include "thread.h"
#include "event.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"
Expand Down
2 changes: 1 addition & 1 deletion eigrpd/eigrp_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <zebra.h>

#include "thread.h"
#include "event.h"
#include "linklist.h"
#include "prefix.h"
#include "if.h"
Expand Down
2 changes: 1 addition & 1 deletion eigrpd/eigrp_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion eigrpd/eigrp_neighbor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion eigrpd/eigrp_network.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include <zebra.h>

#include "thread.h"
#include "event.h"
#include "linklist.h"
#include "prefix.h"
#include "if.h"
Expand Down
Loading

0 comments on commit cb37cb3

Please sign in to comment.