On Tue, Mar 14, 2023 at 06:20:42PM -0700, Stephen Hemminger wrote:
> On Tue, 14 Mar 2023 15:50:39 -0700
> Tyler Retzlaff <roret...@linux.microsoft.com> wrote:
> 
> > +   /* Wait for the thread wrapper to initialize thread successfully */
> > +   while ((thread_wrapper_status =
> > +           __atomic_load_n(&ctx->thread_wrapper_status,
> > +           __ATOMIC_ACQUIRE)) == THREAD_WRAPPER_LAUNCHING)
> > +           sched_yield();
> 
> Using pthread condition variable would be better, and avoid
> using sched_yield() which is deprecated and not guaranteed to
> work in cases where threads have different priority.

seems reasonable since this code is platform dependent, i'll spin a new
patch with a condvar then.

thanks for the suggestion.

Reply via email to