aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Spliet <rspliet@mpi-sws.org>2013-10-22 04:13:12 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2013-11-11 06:48:08 -0500
commit000d127ec760ac2ec0ecbe403c30c2f85745c5da (patch)
treed69cdf32adeedd56c485a30d112133b0580a0afa
parentf4d43d7b7d23c6445f099c28e156f0cffdaae000 (diff)
liblitmus/bin: Use inttypes.h macros for 64-bit integer printing
Fixed build on ARMv7 Signed-off-by: Roy Spliet <rspliet@mpi-sws.org>
-rw-r--r--bin/uncache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/uncache.c b/bin/uncache.c
index b6f6913..5170155 100644
--- a/bin/uncache.c
+++ b/bin/uncache.c
@@ -8,6 +8,7 @@
8#include <stdint.h> 8#include <stdint.h>
9#include <sys/fcntl.h> 9#include <sys/fcntl.h>
10#include <sys/mman.h> 10#include <sys/mman.h>
11#include <inttypes.h>
11 12
12/* Test tool for validating Litmus's uncache device. */ 13/* Test tool for validating Litmus's uncache device. */
13/* Tool also capable basic cache vs. sysmem statistics. */ 14/* Tool also capable basic cache vs. sysmem statistics. */
@@ -209,7 +210,7 @@ int do_data(int do_uncache, int64_t* time)
209 } 210 }
210 clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); 211 clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end);
211 elapsed = timespec_to_us(timespec_sub(end, start)); 212 elapsed = timespec_to_us(timespec_sub(end, start));
212 printf("%s Time: %ldus\n", (do_uncache) ? 213 printf("%s Time: %"PRIi64"us\n", (do_uncache) ?
213 "Uncache" : "Cache", elapsed); 214 "Uncache" : "Cache", elapsed);
214 215
215 munmap((char*)data, size); 216 munmap((char*)data, size);
@@ -304,7 +305,7 @@ int do_max_alloc(void)
304 free(maps); 305 free(maps);
305 close(fd); 306 close(fd);
306 307
307 printf("Maxed out allocs with %d mmaps of %lu pages in size.\n", 308 printf("Maxed out allocs with %d mmaps of %"PRIu64" pages in size.\n",
308 count, mmap_size/PAGE_SIZE); 309 count, mmap_size/PAGE_SIZE);
309 310
310 return 0; 311 return 0;