diff options
Diffstat (limited to 'lib/workqueue.c')
| -rw-r--r-- | lib/workqueue.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/workqueue.c b/lib/workqueue.c index 1789c6b7db..612421c80b 100644 --- a/lib/workqueue.c +++ b/lib/workqueue.c @@ -15,10 +15,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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> @@ -117,8 +116,9 @@ static int work_queue_schedule(struct work_queue *wq, unsigned int delay) /* if appropriate, schedule work queue thread */ if (CHECK_FLAG(wq->flags, WQ_UNPLUGGED) && (wq->thread == NULL) && (listcount(wq->items) > 0)) { - wq->thread = thread_add_background(wq->master, work_queue_run, - wq, delay); + wq->thread = NULL; + thread_add_timer_msec(wq->master, work_queue_run, wq, delay, + &wq->thread); /* set thread yield time, if needed */ if (wq->thread && wq->spec.yield != THREAD_YIELD_TIME_SLOT) thread_set_yield_time(wq->thread, wq->spec.yield); @@ -177,21 +177,21 @@ DEFUN (show_work_queues, struct listnode *node; struct work_queue *wq; - vty_out(vty, "%c %8s %5s %8s %8s %21s%s", ' ', "List", "(ms) ", - "Q. Runs", "Yields", "Cycle Counts ", VTY_NEWLINE); - vty_out(vty, "%c %8s %5s %8s %8s %7s %6s %8s %6s %s%s", 'P', "Items", + vty_out(vty, "%c %8s %5s %8s %8s %21s\n", ' ', "List", "(ms) ", + "Q. Runs", "Yields", "Cycle Counts "); + vty_out(vty, "%c %8s %5s %8s %8s %7s %6s %8s %6s %s\n", 'P', "Items", "Hold", "Total", "Total", "Best", "Gran.", "Total", "Avg.", - "Name", VTY_NEWLINE); + "Name"); for (ALL_LIST_ELEMENTS_RO(work_queues, node, wq)) { - vty_out(vty, "%c %8d %5d %8ld %8ld %7d %6d %8ld %6u %s%s", + vty_out(vty, "%c %8d %5d %8ld %8ld %7d %6d %8ld %6u %s\n", (CHECK_FLAG(wq->flags, WQ_UNPLUGGED) ? ' ' : 'P'), listcount(wq->items), wq->spec.hold, wq->runs, wq->yields, wq->cycles.best, wq->cycles.granularity, wq->cycles.total, (wq->runs) ? (unsigned int)(wq->cycles.total / wq->runs) : 0, - wq->name, VTY_NEWLINE); + wq->name); } return CMD_SUCCESS; @@ -320,7 +320,7 @@ int work_queue_run(struct thread *thread) if (wq->spec.errorfunc) wq->spec.errorfunc(wq, item); } - /* fall through here is deliberate */ + /* fallthru */ case WQ_SUCCESS: default: { work_queue_item_remove(wq, node); |
