]> git.proxmox.com Git - mirror_frr.git/commit - lib/workqueue.c
2005-05-23 Paul Jakma <paul@dishone.st>
authorpaul <paul>
Mon, 23 May 2005 13:42:46 +0000 (13:42 +0000)
committerpaul <paul>
Mon, 23 May 2005 13:42:46 +0000 (13:42 +0000)
commit269d74fdc39a612da8f627bf97628c68d25a16ab
tree8add14e852e83369123ee576a995b28f006800d4
parenta94feb380df46bdfc742257648c9825e8e7b17c0
2005-05-23 Paul Jakma <paul@dishone.st>

* workqueue.h: Add a WQ_QUEUE_BLOCKED item_status return code,
  to allow a queue function to indicate the queue is not
  ready/blocked - rather than any problem with the item at hand.
  Add a notion of being able to 'plug' and 'unplug' a queue.
  Add helpers to plug/unplug a queue.
  Add a completion callback, to be called when a queue is emptied.
* workqueue.c: (work_queue_new) remove useless list_free.
  (work_queue_schedule) new internal helper function to schedule
  queue, if appropriate.
  (work_queue_add) use work_queue_schedule
  (show_work_queues) Print 'P' if queue is plugged.
  (work_queue_plug) new API function, plug a queue - ie prevent it
  from 'drained' / processed / scheduled.
  (work_queue_unplug) unplug a queue, allowing it to be drained
  / scheduled / processed again.
  (work_queue_run) Add support for WQ_QUEUE_BLOCKED.
  Add comment for RETRY_NOW case.
  Make hysteris more aggresive in ramping up granularity, improves
  performance significantly.
  Add support for calling completion callback when queue is emptied,
  possibly useful for knowing when to unplug a queue.
lib/ChangeLog
lib/workqueue.c
lib/workqueue.h