diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2023-11-02 19:17:48 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-11-03 18:06:01 +0000 |
| commit | 2a65f05d77f88f96d4385040d01492e805e1cc44 (patch) | |
| tree | 4cfebebe96bca76a835e0316adb98f5581952889 /lib/workqueue.c | |
| parent | b14f75540892e2e90ca4f8d9ae8c2a31c6d32681 (diff) | |
lib: Remove unused WQ_RETRY_XXX enums
These enum's have been around since 2005 and FRR
still does not have any users of these particular
values. After almost 20 years, let's simplify the
code slightly and remove them.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'lib/workqueue.c')
| -rw-r--r-- | lib/workqueue.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/workqueue.c b/lib/workqueue.c index e87edef68b..d630af1d1d 100644 --- a/lib/workqueue.c +++ b/lib/workqueue.c @@ -281,8 +281,7 @@ void work_queue_run(struct event *thread) do { ret = wq->spec.workfunc(wq, item->data); item->ran++; - } while ((ret == WQ_RETRY_NOW) - && (item->ran < wq->spec.max_retries)); + } while (item->ran < wq->spec.max_retries); switch (ret) { case WQ_QUEUE_BLOCKED: { @@ -292,9 +291,6 @@ void work_queue_run(struct event *thread) item->ran--; goto stats; } - case WQ_RETRY_LATER: { - goto stats; - } case WQ_REQUEUE: { item->ran--; work_queue_item_requeue(wq, item); @@ -312,11 +308,6 @@ void work_queue_run(struct event *thread) titem = item; break; } - case WQ_RETRY_NOW: - /* a RETRY_NOW that gets here has exceeded max_tries, same - * as ERROR - */ - fallthrough; case WQ_SUCCESS: default: { work_queue_item_remove(wq, item); @@ -368,8 +359,7 @@ stats: /* Is the queue done yet? If it is, call the completion callback. */ if (!work_queue_empty(wq)) { - if (ret == WQ_RETRY_LATER || - ret == WQ_QUEUE_BLOCKED) + if (ret == WQ_QUEUE_BLOCKED) work_queue_schedule(wq, wq->spec.retry); else work_queue_schedule(wq, 0); |
