Add a garbage RCU implementation
[akaros.git] / kern / include / completion.h
1 /* Copyright (c) 2015 Google Inc
2  * Davide Libenzi <dlibenzi@google.com>
3  * See LICENSE for details.
4  */
5
6 #pragma once
7
8 #include <kthread.h>
9
10 struct completion {
11         struct cond_var cv;
12         int count;
13 };
14
15 void completion_init(struct completion *comp, int count);
16 void completion_complete(struct completion *comp, int how_much);
17 void completion_wait(struct completion *comp);