This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Don't use catomic functions in mcount
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 6 May 2014 14:01:04 +0200
- Subject: Re: [PATCH] Don't use catomic functions in mcount
- Authentication-results: sourceware.org; auth=none
- References: <mvma9av19u2 dot fsf at hawking dot suse dot de>
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.