diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-10-31 21:55:22 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2013-10-31 22:49:43 +0100 |
commit | d9cb7a967513482c399d44e390429cea3de1d86d (patch) | |
tree | baac216f52927e9979cb4ff317d7eff3ba592838 | |
parent | a00d7b07a89d1bb0b6c9a51bfec4e53a76940bb3 (diff) |
backports: add reinit_completion()
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r-- | backport/backport-include/linux/completion.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/backport/backport-include/linux/completion.h b/backport/backport-include/linux/completion.h new file mode 100644 index 00000000..399430d1 --- /dev/null +++ b/backport/backport-include/linux/completion.h @@ -0,0 +1,20 @@ +#ifndef __BACKPORT_COMPLETION_H +#define __BACKPORT_COMPLETION_H +#include_next <linux/completion.h> +#include <linux/version.h> + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0) +/** + * reinit_completion - reinitialize a completion structure + * @x: pointer to completion structure that is to be reinitialized + * + * This inline function should be used to reinitialize a completion structure so it can + * be reused. This is especially important after complete_all() is used. + */ +static inline void reinit_completion(struct completion *x) +{ + x->done = 0; +} +#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0) */ + +#endif /* __BACKPORT_COMPLETION_H */ |