labath added a comment.

In D64647#1609600 <https://reviews.llvm.org/D64647#1609600>, @mgorny wrote:

> It seems that the patch is wrong with the current logic, and this is somehow 
> blurry because of Linux implementation limitations. FWIU, `eStateSuspended` 
> will never happen and instead we should keep threads without explicit action 
> suspsended. It's unclear yet whether this is desirable long-term, or if we 
> should change the logic to explicitly indicate state for each thread.


Yes, eStateSuspended will never happen on linux. It wouldn't be too hard to 
make use of that state -- we could set unresumed threads to "suspened" in 
NPL::Resume, and then when we go to stop all threads (NPL::StopRunningThreads), 
we would just avoid sending signals to suspended threads and just silently set 
them back to "stopped". However, I don't see a reason to do that now, as it 
would just add code for jumping between the states.

However, if it makes your life easier, I think you should be able to use 
eStateSuspended inside NetBSD code for anything you want. Nobody will inspect 
the state of threads while the process is running, so that could just be an 
implementation detail.

In fact I suspect the nobody will inspect the thread state whatsoever because 
once the process is stopped, all threads are assumed to be stopped too.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64647/new/

https://reviews.llvm.org/D64647



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to