summaryrefslogtreecommitdiff
path: root/components/drivers/include/ipc/completion.h
diff options
context:
space:
mode:
Diffstat (limited to 'components/drivers/include/ipc/completion.h')
-rw-r--r--components/drivers/include/ipc/completion.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/components/drivers/include/ipc/completion.h b/components/drivers/include/ipc/completion.h
new file mode 100644
index 0000000000..e3e883ba8b
--- /dev/null
+++ b/components/drivers/include/ipc/completion.h
@@ -0,0 +1,23 @@
+#ifndef COMPLETION_H_
+#define COMPLETION_H_
+
+#include <rtthread.h>
+
+/**
+ * Completion
+ */
+
+struct rt_completion
+{
+ rt_uint32_t flag;
+
+ /* suspended list */
+ rt_list_t suspended_list;
+};
+
+void rt_completion_init(struct rt_completion *completion);
+rt_err_t rt_completion_wait(struct rt_completion *completion,
+ rt_int32_t timeout);
+void rt_completion_done(struct rt_completion *completion);
+
+#endif