Lines Matching defs:thread
2 * xcam_thread.cpp - Thread
27 Thread::Thread (const char *name)
37 Thread::~Thread ()
44 Thread::thread_func (void *user_data)
46 Thread *thread = (Thread *)user_data;
51 SmartLock locker(thread->_mutex);
54 ret = thread->started ();
58 SmartLock locker(thread->_mutex);
59 if (!thread->_started || ret == false) {
60 thread->_started = false;
61 thread->_thread_id = 0;
67 ret = thread->loop ();
70 thread->stopped ();
72 SmartLock locker(thread->_mutex);
73 thread->_stopped = true;
74 thread->_exit_cond.broadcast ();
80 Thread::started ()
82 XCAM_LOG_DEBUG ("Thread(%s) started", XCAM_STR(_name));
87 Thread::stopped ()
89 XCAM_LOG_DEBUG ("Thread(%s) stopped", XCAM_STR(_name));
92 bool Thread::start ()
109 XCAM_LOG_WARNING ("Thread(%s) set name to thread_id failed.(%d, %s)", XCAM_STR(_name), ret, strerror(ret));
117 Thread::emit_stop ()
124 bool Thread::stop ()
136 bool Thread::is_running ()