--- include/linux/completion.h.orig 2008-08-13 00:56:52.000000000 -0700 +++ include/linux/completion.h 2008-08-18 13:00:23.000000000 -0700 @@ -10,6 +10,16 @@ #include +/** + * struct completion - structure used to maintain state for a "completion" + * @done: counting variable used to signal completion + * @wait: internal wait queue head; used for locking and synchronization + * + * This is the structure used to maintain the state for a "completion". See + * also: complete(), wait_for_completion() (and friends _timeout, + * _interruptible, _interruptible_timeout, and _killable), init_completion(), + * and macros DECLARE_COMPLETION() and INIT_COMPLETION(). + */ struct completion { unsigned int done; wait_queue_head_t wait; @@ -36,6 +46,13 @@ # define DECLARE_COMPLETION_ONSTACK(work) DECLARE_COMPLETION(work) #endif +/** + * init_completion: - Initialize a dynamically allocated completion + * @x: completion structure that is to be initialized + * + * This inline function will initialize a dynamically created completion + * structure. + */ static inline void init_completion(struct completion *x) { x->done = 0;