Merged.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
utils/cpucycle.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/utils/cpucycle.c b/utils/cpucycle.c
index 5ad36bc..f896815 100644
--- a/utils/cpucycle.c
+++ b/utils/cpucycle.c
@@ -35,11 +35,11 @@
#include <sys/time.h>
#include <sys/resource.h>
-static bool intr;
+volatile sig_atomic_t intr = 0;
void sigalarm(int sig)
{
- intr = true;
+ intr = 1;
}
int main(int argc, char *argv[])
@@ -97,10 +97,10 @@ int main(int argc, char *argv[])
/* warmup */
alarm(1);
- for (counter = 0, intr = false; !intr ; counter++);
+ for (counter = 0, intr = 0; !intr ; counter++);
alarm(1);
- for (counter = 0, intr = false; !intr ; counter++);
+ for (counter = 0, intr = 0; !intr ; counter++);
printf("%ld\n", counter);
--
1.7.5.4