]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/bfd.c
lib: Convert THREAD_YIELD_TIME_SLOT to EVENT_YIELD_TIME_SLOT
[mirror_frr.git] / lib / bfd.c
index c1e0fff7f578ed58ef95b1e934f5377dd6a66350..e1aa45f097157822b903ac665ed364a5bdec5f77 100644 (file)
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -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"
@@ -75,7 +75,7 @@ struct bfd_session_params {
         * Next event.
         *
         * This variable controls what action to execute when the command batch
-        * finishes. Normally we'd use `thread_add_event` value, however since
+        * finishes. Normally we'd use `event_add_event` value, however since
         * that function is going to be called multiple times and the value
         * might be different we'll use this variable to keep track of it.
         */
@@ -87,7 +87,7 @@ struct bfd_session_params {
         * configuration load or northbound batch), so we'll use this to
         * install/uninstall the BFD session parameters only once.
         */
-       struct thread *installev;
+       struct event *installev;
 
        /** BFD session installation state. */
        bool installed;
@@ -485,7 +485,7 @@ static bool _bfd_sess_valid(const struct bfd_session_params *bsp)
        return true;
 }
 
-static void _bfd_sess_send(struct thread *t)
+static void _bfd_sess_send(struct event *t)
 {
        struct bfd_session_params *bsp = THREAD_ARG(t);
        int rv;
@@ -733,13 +733,13 @@ void bfd_sess_set_auto_source(struct bfd_session_params *bsp, bool enable)
 void bfd_sess_install(struct bfd_session_params *bsp)
 {
        bsp->lastev = BSE_INSTALL;
-       thread_add_event(bsglobal.tm, _bfd_sess_send, bsp, 0, &bsp->installev);
+       event_add_event(bsglobal.tm, _bfd_sess_send, bsp, 0, &bsp->installev);
 }
 
 void bfd_sess_uninstall(struct bfd_session_params *bsp)
 {
        bsp->lastev = BSE_UNINSTALL;
-       thread_add_event(bsglobal.tm, _bfd_sess_send, bsp, 0, &bsp->installev);
+       event_add_event(bsglobal.tm, _bfd_sess_send, bsp, 0, &bsp->installev);
 }
 
 enum bfd_session_state bfd_sess_status(const struct bfd_session_params *bsp)