summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2019-07-16 19:44:29 +0200
committerRichard Braun <rbraun@sceen.net>2019-08-16 03:57:13 +0200
commitbf650c89d23c4bfe9aa36b14d10df8193c3bad2a (patch)
tree1f04bf17cde67cf23aabc545d362c8065f08865f
parent0776db605ea338ab65063fdfad6930025ccda9d9 (diff)
Improve the work API documentation
-rw-r--r--kern/work.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/kern/work.h b/kern/work.h
index 3a58befc..e072ed47 100644
--- a/kern/work.h
+++ b/kern/work.h
@@ -48,8 +48,8 @@ struct work_queue;
*
* These functions implement handler operations.
*
- * Scheduling work synchronizes with handler operations on the same
- * work.
+ * The schedule operation on a work synchronizes with the handler operation
+ * on the same work.
*/
typedef void (*work_fn_t)(struct work *);
@@ -132,14 +132,23 @@ work_init(struct work *work, work_fn_t fn)
/*
* Schedule work for deferred processing.
*
+ * This operation synchronizes with the handler operation on the same work.
+ *
+ * This function may be called from interrupt context.
+ */
+void work_schedule(struct work *work, int flags);
+
+/*
+ * Schedule a queue of works.
+ *
* After being scheduled, a work queue must be reinitialized before
* it can be reused.
*
* This function may be called from interrupt context.
*
- * This operation synchronizes with handler operations on the same work.
+ * This functon is semantically identical to scheduling each work in the
+ * queue individually, but more efficiently.
*/
-void work_schedule(struct work *work, int flags);
void work_queue_schedule(struct work_queue *queue, int flags);
/*