You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.0 KiB
65 lines
2.0 KiB
From f0fc9d7999a94da3d471c4e0a35b1f447f25eea6 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
|
|
Date: Mon, 26 Feb 2024 21:08:42 +0100
|
|
Subject: [PATCH] Add normal task queue also to non-thread version
|
|
|
|
Non-thread builds are used by us for dhcp package. Make it working
|
|
again.
|
|
|
|
Related to [GL #4424] and [GL #4459].
|
|
---
|
|
lib/isc/task.c | 14 ++++++++------
|
|
1 file changed, 8 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/lib/isc/task.c b/lib/isc/task.c
|
|
index cc83269..5315b51 100644
|
|
--- a/lib/isc/task.c
|
|
+++ b/lib/isc/task.c
|
|
@@ -1115,7 +1115,7 @@ dispatch(isc__taskmgr_t *manager, isc_taskqueue_t qid) {
|
|
}
|
|
#else /* USE_WORKER_THREADS */
|
|
if (total_dispatch_count >= DEFAULT_TASKMGR_QUANTUM ||
|
|
- empty_readyq(manager))
|
|
+ empty_readyq(manager, qid))
|
|
break;
|
|
#endif /* USE_WORKER_THREADS */
|
|
XTHREADTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TASK,
|
|
@@ -1318,11 +1318,11 @@ dispatch(isc__taskmgr_t *manager, isc_taskqueue_t qid) {
|
|
}
|
|
|
|
#ifndef USE_WORKER_THREADS
|
|
- ISC_LIST_APPENDLIST(manager->ready_tasks, new_ready_tasks, ready_link);
|
|
- ISC_LIST_APPENDLIST(manager->ready_priority_tasks, new_priority_tasks,
|
|
+ ISC_LIST_APPENDLIST(manager->ready_tasks[qid], new_ready_tasks, ready_link);
|
|
+ ISC_LIST_APPENDLIST(manager->ready_priority_tasks[qid], new_priority_tasks,
|
|
ready_priority_link);
|
|
manager->tasks_ready += tasks_ready;
|
|
- if (empty_readyq(manager))
|
|
+ if (empty_readyq(manager, qid))
|
|
manager->mode = isc_taskmgrmode_normal;
|
|
#endif
|
|
|
|
@@ -1713,7 +1713,8 @@ isc__taskmgr_ready(isc_taskmgr_t *manager0) {
|
|
return (false);
|
|
|
|
LOCK(&manager->lock);
|
|
- is_ready = !empty_readyq(manager);
|
|
+ is_ready = !empty_readyq(manager, isc_taskqueue_normal) ||
|
|
+ !empty_readyq(manager, isc_taskqueue_slow);
|
|
UNLOCK(&manager->lock);
|
|
|
|
return (is_ready);
|
|
@@ -1730,7 +1731,8 @@ isc__taskmgr_dispatch(isc_taskmgr_t *manager0) {
|
|
if (manager == NULL)
|
|
return (ISC_R_NOTFOUND);
|
|
|
|
- dispatch(manager);
|
|
+ dispatch(manager, isc_taskqueue_normal);
|
|
+ dispatch(manager, isc_taskqueue_slow);
|
|
|
|
return (ISC_R_SUCCESS);
|
|
}
|
|
--
|
|
2.43.2
|
|
|