[PATCH] Don't use catomic functions in mcount

Ondřej Bílka neleai@seznam.cz
Tue May 6 12:01:00 GMT 2014


On Tue, May 06, 2014 at 12:27:01PM +0200, Andreas Schwab wrote:
> mcount cannot use catomic function since it is called by
> __libc_start_main before TLS is set up.  This reverts the change made by
> commit 8099361.
>
looks ok.
 
> Andreas.
> 
> 	[BZ #16912]
> 	* gmon/mcount.c (_MCOUNT_DECL): Use
> 	atomic_compare_and_exchange_bool_acq instead of
> 	catomic_compare_and_exchange_bool_acq.
> ---
>  gmon/mcount.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/gmon/mcount.c b/gmon/mcount.c
> index 0c2acd2..9d4a1a50 100644
> --- a/gmon/mcount.c
> +++ b/gmon/mcount.c
> @@ -69,8 +69,8 @@ _MCOUNT_DECL(frompc, selfpc)	/* _mcount; may be static, inline, etc */
>  	 * check that we are profiling
>  	 * and that we aren't recursively invoked.
>  	 */
> -	if (catomic_compare_and_exchange_bool_acq (&p->state, GMON_PROF_BUSY,
> -						   GMON_PROF_ON))
> +	if (atomic_compare_and_exchange_bool_acq (&p->state, GMON_PROF_BUSY,
> +						  GMON_PROF_ON))
>  	  return;
>  
>  	/*
> -- 
> 1.9.2
> 
> -- 
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."

-- 

The electrician didn't know what the yellow cable was so he yanked the ethernet out.



More information about the Libc-alpha mailing list