• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ****************************************************************************
11  ****************************************************************************/
12 #ifndef __LINUX_COMPLETION_H
13 #define __LINUX_COMPLETION_H
14 
15 #include <linux/wait.h>
16 
17 struct completion {
18  unsigned int done;
19  wait_queue_head_t wait;
20 };
21 
22 #define COMPLETION_INITIALIZER(work)   { 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait) }
23 
24 #define COMPLETION_INITIALIZER_ONSTACK(work)   ({ init_completion(&work); work; })
25 
26 #define DECLARE_COMPLETION(work)   struct completion work = COMPLETION_INITIALIZER(work)
27 
28 #define DECLARE_COMPLETION_ONSTACK(work) DECLARE_COMPLETION(work)
29 
30 #define INIT_COMPLETION(x) ((x).done = 0)
31 
32 #endif
33