summaryrefslogtreecommitdiff
path: root/lib/workqueue.h
diff options
context:
space:
mode:
authorpaul <paul>2005-04-27 12:39:27 +0000
committerpaul <paul>2005-04-27 12:39:27 +0000
commit843696841b55343e45d6cfdad19035882a67b99f (patch)
tree62e6224fae2ea014023117b21b0980605b98472a /lib/workqueue.h
parent07334da01ca0a7b77cb11add3102b57077eb03eb (diff)
2005-04-27 Paul Jakma <paul.jakma@sun.com>
* workqueue.h: (struct work_queue_item) change retry_count to ran, its a count of number item has been run. * workqueue.c: (show_work_queues) Fix formating of slightly bugfix: fix SIGFPE if wq->runs is 0. (work_queue_run) retry logic was slightly wrong. cycles.best is 0 initialy, granularity is 1, so update best if cycles >= granularity, not just >.
Diffstat (limited to 'lib/workqueue.h')
-rw-r--r--lib/workqueue.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/workqueue.h b/lib/workqueue.h
index 45fffe7b..5b4e82e5 100644
--- a/lib/workqueue.h
+++ b/lib/workqueue.h
@@ -42,7 +42,7 @@ typedef enum
struct work_queue_item
{
void *data; /* opaque data */
- unsigned short retry_count; /* number of times retried */
+ unsigned short ran; /* # of times item has been run */
};
struct work_queue
@@ -54,13 +54,13 @@ struct work_queue
/* specification for this work queue */
struct {
/* work function to process items with */
- wq_item_status (*workfunc) (void *);
+ wq_item_status (*workfunc) ();
/* error handling function, optional */
void (*errorfunc) (struct work_queue *, struct work_queue_item *);
/* callback to delete user specific item data */
- void (*del_item_data) (void *);
+ void (*del_item_data) ();
/* max number of retries to make for item that errors */
unsigned int max_retries;