File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed
Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -166,8 +166,6 @@ uint32_t *lwp_get_kernel_sp(void)
166166/* lwp-thread clean up routine */
167167void lwp_cleanup (struct rt_thread * tid )
168168{
169- struct rt_lwp * lwp ;
170-
171169 if (tid == NULL )
172170 {
173171 LOG_I ("%s: invalid parameter tid == NULL" , __func__ );
@@ -176,18 +174,8 @@ void lwp_cleanup(struct rt_thread *tid)
176174 else
177175 LOG_D ("cleanup thread: %s, stack_addr: 0x%x" , tid -> parent .name , tid -> stack_addr );
178176
179- /**
180- * Brief: lwp thread cleanup
181- *
182- * Note: Critical Section
183- * - thread control block (RW. It's ensured that no one else can access tcb
184- * other than itself)
185- */
186- lwp = (struct rt_lwp * )tid -> lwp ;
187177 lwp_thread_signal_detach (& tid -> signal );
188178
189- /* tty will be release in lwp_ref_dec() if ref is cleared */
190- lwp_ref_dec (lwp );
191179 return ;
192180}
193181
Original file line number Diff line number Diff line change @@ -604,6 +604,8 @@ void _thread_exit(rt_lwp_t lwp, rt_thread_t thread)
604604 lwp_tid_put (thread -> tid );
605605 thread -> tid = 0 ;
606606
607+ lwp_ref_dec (lwp );
608+
607609 rt_thread_delete (thread );
608610 rt_schedule ();
609611 while (1 ) ;
You can’t perform that action at this time.
0 commit comments