On Wed, 24 Feb 2021 08:22:42 +0200 Tzvetomir Stoyanov <tz.stoyanov@xxxxxxxxx> wrote: > > Either way, we need to make sure there's no path that could cause the guest > > (or host) to get stuck in the barrier. > > I think it is better to move the whole logic in the library - running > the ptheads and > synchronizing with mutex and barrier. The API caller (trace-cmd) will receive > only a pthread_t id of the running thread, created by the library. As long as the code is together and robust to prevent unexpected deadlocks. -- Steve