cpp_workQueue.h
浏览该文件的文档.
1 /*
2  * Copyright (C) 2015-2017 Alibaba Group Holding Limited
3  */
4 
5 #include <stdint.h>
6 #include <k_api.h>
7 
12 namespace AOS {
13 
19  class WorkQueue
20  {
21  public:
31  kstat_t create(const name_t *name, uint8_t pri, cpu_stack_t *stack_buf,
32  size_t stack_size);
33 
39  kstat_t destory(void);
40 
46  kworkqueue_t *self(void);
47 
48  private:
49  kworkqueue_t _workqueue_def;
50  };
51 
52  class Work
53  {
54  public:
62  kstat_t init(work_handle_t handle, void *arg, tick_t dly);
63 
69  kstat_t run(kworkqueue_t *workqueue);
70 
76  kstat_t sched(void);
77 
83  kstat_t cancel(void);
84 
90  kwork_t *self(void);
91 
92  private:
96  kwork_t _work_def;
97  };
98 
99 }
kstat_t init(work_handle_t handle, void *arg, tick_t dly)
kstat_t run(kworkqueue_t *workqueue)
kstat_t cancel(void)
kstat_t sched(void)
WorkQueue Class.
Definition: cpp_workQueue.h:20
kstat_t destory(void)
kstat_t create(const name_t *name, uint8_t pri, cpu_stack_t *stack_buf, size_t stack_size)
Definition: cpp_mutex.h:21