posix/coil/Task.h
Go to the documentation of this file.
1 // -*- C++ -*-
19 #ifndef COIL_TASK_H
20 #define COIL_TASK_H
21 
22 #include <pthread.h>
23 
24 namespace coil
25 {
39  class Task
40  {
41  public:
57  Task();
58 
74  virtual ~Task();
75 
95  virtual int open(void* args = 0);
96 
116  virtual int close(unsigned long flags = 0);
117 
133  virtual int svc();
134 
150  virtual void activate();
151 
167  virtual int wait(void);
168 
184  virtual int suspend(void);
185 
201  virtual int resume(void);
202 
218  virtual void reset();
219 
235  virtual void finalize();
236 
256  static void* svc_run(void* args = 0);
257 
258  private:
259  int m_count;
260  pthread_t m_thread;
261  pthread_attr_t m_attr;
262  void* m_args;
263 
264  };
265 };
266 
267 #endif // COIL_TASK_H
virtual int svc()
Execute thread.
virtual ~Task()
Destructor.
virtual int wait(void)
Waiting for the thread terminate.
virtual int suspend(void)
Suspending the task.
virtual int resume(void)
Resuming the suspended task.
pthread_attr_t m_attr
Task()
Constructor.
virtual void reset()
Reset of task count.
static void * svc_run(void *args=0)
Start thread Execution.
virtual int open(void *args=0)
Task open.
virtual int close(unsigned long flags=0)
Task close.
pthread_t m_thread
virtual void activate()
Create a thread.
virtual void finalize()
Finalizing the task.
Common Object Interface Layer.


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Thu Jun 6 2019 19:26:00