On Mon, Mar 5, 2012 at 1:17 PM, Richard Guenther
<richard.guent...@gmail.com> wrote:
> On Wed, Jan 18, 2012 at 3:21 PM, Richard Guenther <rguent...@suse.de> wrote:
>>
>> This fixes PR49484 by protecting __gcov_flush against concurrent
>> execution.  To be able to use the gthread facility I have to
>> introduce the requirement that __GTHREAD_MUTEX_INIT_FUNCTION
>> is always available, even if __GTHREAD_MUTEX_INIT is available as
>> otherwise no dynamic initialization of a mutex is possible.
>> I have adjusted gthr-posix.h and gthr-single.h only - target
>> maintainers, please update your ports accordingly in advance.
>>
>> Boostrap and regtest on x86_64-unknown-linux-gnu is ongoing,
>> but this looks like something for stage1 anyway.
>
> Bootstrap and regtest finished ok.  I am going to commit this without "fixing"
> eventually broken targets that I know nothing of.  See above.
>
> Unless I hear objections until tomorrow.

Done now, after waiting another week.

Thanks,
Richard.

>> 2012-01-18  Richard Guenther  <rguent...@suse.de>
>>
>>        * gthr.h (__GTHREAD_MUTEX_INIT_FUNCTION): Adjust specification.
>>        * gthr-posix.h (__GTHREAD_MUTEX_INIT_FUNCTION): Define.
>>        (__gthread_mutex_init_function): New function.
>>        * gthr-single.h (__GTHREAD_MUTEX_INIT_FUNCTION): Define.
>>
>>        PR gcov/49484
>>        * libgcov.c: Include gthr.h.
>>        (__gcov_flush_mx): New global variable.
>>        (init_mx, init_mx_once): New functions.
>>        (__gcov_flush): Protect self with a mutex.
>>        (__gcov_fork): Re-initialize mutex after forking.
>>        * unwind-dw2-fde.c: Change condition under which to use
>>        __GTHREAD_MUTEX_INIT_FUNCTION.

Reply via email to