2011/12/7 Ronald S. Bultje <[email protected]> > Hi, > > On Tue, Dec 6, 2011 at 4:32 PM, Sergey Radionov <[email protected]> wrote: > >> 2011/12/7 Luca Barbato <[email protected]> >> >>> On 06/12/11 16:18, Sergey Radionov wrote: >>> >>>> >>>> Meanwhile I noticed that there are some formal issue (tabs, missing >>> spaces and other minor things), that should be taken care. >>> >> I will be glad to hear your recommendations. >> > > > pthread_mutex_lock(&c->current_job_lock); > > - self_id = c->current_job++; > > + self_id = (c->running_threads)++; > > Omit the brackets. > > > for (;;){ > > - while (our_job >= c->job_count) { > > - if (c->current_job == thread_count + c->job_count) > > + do{ > > + if ( !(c->job_count) ) > > Omit the spaces and brackets. > > > pthread_cond_wait(&c->current_job_cond, > &c->current_job_lock); > > - our_job = self_id; > > + if(c->current_job < c->job_count) > > Space between "if" and "(". > > > + our_job = (c->current_job)++; > > Omit brackets. > > > if (c->done) { > > + --(c->running_threads); > > Omit brackets. > > > - } > > + }while (our_job >= c->job_count); > > Space between "}" and "while". > > > > pthread_mutex_lock(&c->current_job_lock); > > - our_job = c->current_job++; > > + > > + --(c->job_count); > > Omit brackets. > Thank you for your comments. New variant attached.
> > Ronald > > _______________________________________________ > libav-devel mailing list > [email protected] > https://lists.libav.org/mailman/listinfo/libav-devel > >
0001-libavcodec-phtread.c-fixed-deadlock-under-win32.patch
Description: Binary data
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
