[PATCH] Don't use catomic functions in mcount
Andreas Schwab
schwab@suse.de
Tue May 6 10:27:00 GMT 2014
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."
More information about the Libc-alpha
mailing list