This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Don't use catomic functions in mcount
- From: Andreas Schwab <schwab at suse dot de>
- To: libc-alpha at sourceware dot org
- Date: Tue, 06 May 2014 12:27:01 +0200
- Subject: [PATCH] Don't use catomic functions in mcount
- Authentication-results: sourceware.org; auth=none
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.
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."