]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - gmon/mcount.c
iconv, localedef: avoid floating point rounding differences [BZ #24372]
[thirdparty/glibc.git] / gmon / mcount.c
index 8e54812d75c3f1e021e1b80a9c83b0b2615aada6..9d4a1a50fa6ab21af97293c4ec59a199c06f0a5d 100644 (file)
@@ -37,9 +37,9 @@ static char sccsid[] = "@(#)mcount.c  8.1 (Berkeley) 6/4/93";
 
 /* This file provides the machine-dependent definitions of the _MCOUNT_DECL
    and MCOUNT macros.  */
-#include "machine-gmon.h"
+#include <machine-gmon.h>
 
-#include <atomicity.h>
+#include <atomic.h>
 
 /*
  * mcount is called on entry to each function compiled with the profiling
@@ -58,10 +58,10 @@ static char sccsid[] = "@(#)mcount.c        8.1 (Berkeley) 6/4/93";
  */
 _MCOUNT_DECL(frompc, selfpc)   /* _mcount; may be static, inline, etc */
 {
-       register ARCINDEX *frompcindex;
-       register struct tostruct *top, *prevtop;
-       register struct gmonparam *p;
-       register ARCINDEX toindex;
+       ARCINDEX *frompcindex;
+       struct tostruct *top, *prevtop;
+       struct gmonparam *p;
+       ARCINDEX toindex;
        int i;
 
        p = &_gmonparam;
@@ -69,7 +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 (! compare_and_swap (&p->state, GMON_PROF_ON, GMON_PROF_BUSY))
+       if (atomic_compare_and_exchange_bool_acq (&p->state, GMON_PROF_BUSY,
+                                                 GMON_PROF_ON))
          return;
 
        /*