Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 31769
b: refs/heads/master
c: 8b3db9c
h: refs/heads/master
i:
  31767: 0aa5100
v: v3
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Jul 3, 2006
1 parent 286d66b commit 1de14b9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d7e9629de051bb4b1d104588cd97673ad770809e
refs/heads/master: 8b3db9c542e18b71d4820da4dd9401ee030feacb
12 changes: 12 additions & 0 deletions trunk/include/linux/completion.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ struct completion {
#define DECLARE_COMPLETION(work) \
struct completion work = COMPLETION_INITIALIZER(work)

/*
* Lockdep needs to run a non-constant initializer for on-stack
* completions - so we use the _ONSTACK() variant for those that
* are on the kernel stack:
*/
#ifdef CONFIG_LOCKDEP
# define DECLARE_COMPLETION_ONSTACK(work) \
struct completion work = ({ init_completion(&work); work; })
#else
# define DECLARE_COMPLETION_ONSTACK(work) DECLARE_COMPLETION(work)
#endif

static inline void init_completion(struct completion *x)
{
x->done = 0;
Expand Down

0 comments on commit 1de14b9

Please sign in to comment.