Re: About Thread_Cancel

2021-02-25 Thread Richi Dubey
Hi, Thanks for the help. What is the contradiction? You shouldn't have a blocked thread in a > queue when you want to delete it. The thread needs to be in some kind > of "quiescent" state. Okay, I'll look further into this. On Wed, Feb 24, 2021 at 10:19 PM Gedare Bloom wrote: > On Wed, Feb 24

Re: About Thread_Cancel

2021-02-25 Thread Richi Dubey
Hi Sebastian, Thank you for the help. I will look further into this. Best Regards, Richi. On Wed, Feb 24, 2021 at 10:37 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > Hello Richi, > > the reason for the reference counted life change request and this > sequence of block/unbloc

Re: About Thread_Cancel

2021-02-24 Thread Sebastian Huber
Hello Richi, the reason for the reference counted life change request and this sequence of block/unblock is that you have to be careful with the lock ordering in SMP configurations. _Thread_Add_life_change_request() is called under protection of the thread state lock. The _Thread_Finalize_lif

Re: About Thread_Cancel

2021-02-24 Thread Gedare Bloom
On Wed, Feb 24, 2021 at 12:54 AM Richi Dubey wrote: > > Hi, > > Can someone please give a brief overview of what these three lines aim to > achieve: > > } else if ( _Thread_Is_life_change_allowed( previous ) ) { > _Thread_Add_life_change_request( the_thread ); > _Thread_State_release( t

About Thread_Cancel

2021-02-23 Thread Richi Dubey
Hi, Can someone please give a brief overview of what these three lines aim to achieve: } else if ( _Thread_Is_life_change_allowed( previous ) ) { _Thread_Add_life_change_request( the_thread ); _Thread_State_release( the_thread, &lock_context ); _Thread_Finalize_life_change( the_thr