completion.h 444 B

1234567891011121314151617181920212223
  1. #ifndef COMPLETION_H_
  2. #define COMPLETION_H_
  3. #include <rtthread.h>
  4. /**
  5. * Completion
  6. */
  7. struct rt_completion
  8. {
  9. rt_uint32_t flag;
  10. /* suspended list */
  11. rt_list_t suspended_list;
  12. };
  13. void rt_completion_init(struct rt_completion *completion);
  14. rt_err_t rt_completion_wait(struct rt_completion *completion,
  15. rt_int32_t timeout);
  16. void rt_completion_done(struct rt_completion *completion);
  17. #endif