Subversion Repositories shark

Rev

Rev 422 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
422 giacomo 1
#ifndef __LINUX_COMPLETION_H
2
#define __LINUX_COMPLETION_H
3
 
4
/*
5
 * (C) Copyright 2001 Linus Torvalds
6
 *
7
 * Atomic wait-for-completion handler data structures.
8
 * See kernel/sched.c for details.
9
 */
10
 
11
#include <linux/wait.h>
12
 
13
struct completion {
14
        unsigned int done;
15
        wait_queue_head_t wait;
16
};
17
 
18
#define COMPLETION_INITIALIZER(work) \
19
        { 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait) }
20
 
21
#define DECLARE_COMPLETION(work) \
22
        struct completion work = COMPLETION_INITIALIZER(work)
23
 
490 giacomo 24
extern void init_completion(struct completion *x);
422 giacomo 25
extern void FASTCALL(wait_for_completion(struct completion *));
26
extern void FASTCALL(complete(struct completion *));
27
extern void FASTCALL(complete_all(struct completion *));
28
 
29
#define INIT_COMPLETION(x)      ((x).done = 0)
30
 
31
#endif