Lines Matching refs:thread
103 rt_thread_t thread; in lwp_tid_put() local
110 thread = p->data; in lwp_tid_put()
117 thread = RT_NULL; in lwp_tid_put()
119 if (thread && thread->tid_ref_count) in lwp_tid_put()
122 RT_ASSERT(thread->susp_recycler == RT_NULL); in lwp_tid_put()
123 thread->susp_recycler = current; in lwp_tid_put()
139 rt_thread_t thread = RT_NULL; in lwp_tid_get_thread_raw() local
144 thread = (rt_thread_t)p->data; in lwp_tid_get_thread_raw()
146 return thread; in lwp_tid_get_thread_raw()
151 rt_thread_t thread = RT_NULL; in lwp_tid_get_thread_and_inc_ref() local
154 thread = tid ? lwp_tid_get_thread_raw(tid) : rt_thread_self(); in lwp_tid_get_thread_and_inc_ref()
155 if (thread != RT_NULL) in lwp_tid_get_thread_and_inc_ref()
157 thread->tid_ref_count += 1; in lwp_tid_get_thread_and_inc_ref()
160 return thread; in lwp_tid_get_thread_and_inc_ref()
163 void lwp_tid_dec_ref(rt_thread_t thread) in lwp_tid_dec_ref() argument
166 if (thread) in lwp_tid_dec_ref()
168 RT_ASSERT(rt_object_get_type(&thread->parent) == RT_Object_Class_Thread); in lwp_tid_dec_ref()
169 susp_putter = thread->susp_recycler; in lwp_tid_dec_ref()
172 RT_ASSERT(thread->tid_ref_count > 0); in lwp_tid_dec_ref()
173 thread->tid_ref_count -= 1; in lwp_tid_dec_ref()
174 if (!thread->tid_ref_count && susp_putter) in lwp_tid_dec_ref()
182 void lwp_tid_set_thread(int tid, rt_thread_t thread) in lwp_tid_set_thread() argument
191 p->data = thread; in lwp_tid_set_thread()