]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/wheel.c
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / lib / wheel.c
index cdf738a137f30062058daee13058506b1f5ae537..4aca23481beea650f1a32fd62a9191e48a4707fc 100644 (file)
@@ -1,21 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Timer Wheel
  * Copyright (C) 2016 Cumulus Networks, Inc.
  * Donald Sharp
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 #include "zebra.h"
 #include "linklist.h"
@@ -94,7 +81,7 @@ struct timer_wheel *wheel_init(struct thread_master *master, int period,
        wheel->nexttime = period / slots;
 
        wheel->wheel_slot_lists = XCALLOC(MTYPE_TIMER_WHEEL_LIST,
-                                         slots * sizeof(struct listnode *));
+                                         slots * sizeof(struct list *));
        for (i = 0; i < slots; i++)
                wheel->wheel_slot_lists[i] = list_new();
 
@@ -118,21 +105,6 @@ void wheel_delete(struct timer_wheel *wheel)
        XFREE(MTYPE_TIMER_WHEEL, wheel);
 }
 
-int wheel_stop(struct timer_wheel *wheel)
-{
-       THREAD_OFF(wheel->timer);
-       return 0;
-}
-
-int wheel_start(struct timer_wheel *wheel)
-{
-       if (!wheel->timer)
-               thread_add_timer_msec(wheel->master, wheel_timer_thread, wheel,
-                                     wheel->nexttime, &wheel->timer);
-
-       return 0;
-}
-
 int wheel_add_item(struct timer_wheel *wheel, void *item)
 {
        long long slot;