diff options
author | Richard Braun <rbraun@sceen.net> | 2019-07-16 17:16:42 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2019-08-16 03:57:13 +0200 |
commit | 1ba03aabcdf4ebc126c19bf5f2d9e83f5015b6ad (patch) | |
tree | dc51df412d6a4e4548e78648e339d18842a65fc4 | |
parent | cc6635c0d64e4970345a0451e1b9a2341d7f3f12 (diff) |
Document the work API
-rw-r--r-- | kern/work.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/kern/work.h b/kern/work.h index 60530208..3a58befc 100644 --- a/kern/work.h +++ b/kern/work.h @@ -35,10 +35,6 @@ /* * Deferred work. - * - * This structure should be embedded in objects related to the work. It - * stores the work function and is passed to it as its only parameter. - * The function can then find the containing object with the structof macro. */ struct work; @@ -48,7 +44,12 @@ struct work; struct work_queue; /* - * Type for work functions. + * Type for work callbacks. + * + * These functions implement handler operations. + * + * Scheduling work synchronizes with handler operations on the same + * work. */ typedef void (*work_fn_t)(struct work *); @@ -135,6 +136,8 @@ work_init(struct work *work, work_fn_t fn) * it can be reused. * * This function may be called from interrupt context. + * + * This operation synchronizes with handler operations on the same work. */ void work_schedule(struct work *work, int flags); void work_queue_schedule(struct work_queue *queue, int flags); |