+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Quagga Work Queues.
*
* Copyright (C) 2005 Sun Microsystems, Inc.
- *
- * This file is part of Quagga.
- *
- * Quagga 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, or (at your option) any
- * later version.
- *
- * Quagga 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
*/
#ifndef _QUAGGA_WORK_QUEUE_H
/* action value, for use by item processor and item error handlers */
typedef enum {
WQ_SUCCESS = 0,
- WQ_ERROR, /* Error, run error handler if provided */
WQ_RETRY_NOW, /* retry immediately */
WQ_RETRY_LATER, /* retry later, cease processing work queue */
WQ_REQUEUE, /* requeue item, continue processing work queue */
*/
wq_item_status (*workfunc)(struct work_queue *, void *);
- /* error handling function, optional */
- void (*errorfunc)(struct work_queue *,
- struct work_queue_item *);
-
/* callback to delete user specific item data */
void (*del_item_data)(struct work_queue *, void *);
* user must fill in the spec of the returned work queue before adding
* anything to it
*/
-extern struct work_queue *work_queue_new(struct thread_master *, const char *);
+extern struct work_queue *work_queue_new(struct thread_master *m,
+ const char *queue_name);
/* destroy work queue */
/*
/* unplug the queue, allow it to be drained again */
extern void work_queue_unplug(struct work_queue *wq);
-bool work_queue_is_scheduled(struct work_queue *);
+bool work_queue_is_scheduled(struct work_queue *wq);
/* Helpers, exported for thread.c and command.c */
-extern void work_queue_run(struct thread *);
+extern void work_queue_run(struct thread *thread);
extern void workqueue_cmd_init(void);