mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-17 00:42:27 +00:00
lib/workqueue: Add trivial work_queue_is_scheduled helper
(cherry picked from commit 13c2a3db503fde67f647fa58fd4e1077517ebb5c)
This commit is contained in:
parent
3ac45df164
commit
86582682c9
@ -108,6 +108,12 @@ work_queue_free (struct work_queue *wq)
|
||||
return;
|
||||
}
|
||||
|
||||
bool
|
||||
work_queue_is_scheduled (struct work_queue *wq)
|
||||
{
|
||||
return (wq->thread != NULL);
|
||||
}
|
||||
|
||||
static int
|
||||
work_queue_schedule (struct work_queue *wq, unsigned int delay)
|
||||
{
|
||||
|
@ -122,6 +122,8 @@ extern void work_queue_plug (struct work_queue *wq);
|
||||
/* 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 *);
|
||||
|
||||
/* Helpers, exported for thread.c and command.c */
|
||||
extern int work_queue_run (struct thread *);
|
||||
extern struct cmd_element show_work_queues_cmd;
|
||||
|
Loading…
Reference in New Issue
Block a user