]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sandbox: Use uint64_t instead of u64 for time
authorSimon Glass <sjg@chromium.org>
Sun, 19 May 2013 23:45:35 +0000 (16:45 -0700)
committerSimon Glass <sjg@chromium.org>
Thu, 21 Nov 2013 23:54:25 +0000 (16:54 -0700)
The uint64_t type is defined in linux/types.h, so is safer than u64, which
is not actually a Linux type.

Change-Id: Ifc9a369e6543250c49117b8d3cb3a676eee43e04
Signed-off-by: Simon Glass <sjg@chromium.org>
arch/sandbox/cpu/os.c
include/os.h

index c2e5f57193e65e4f22b954ba7814741881f80c25..db66fd31f254cd733abaadb7db0a0b4c5390dc43 100644 (file)
@@ -8,6 +8,7 @@
 #include <fcntl.h>
 #include <getopt.h>
 #include <stdio.h>
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 #include <termios.h>
@@ -136,7 +137,7 @@ void os_usleep(unsigned long usec)
        usleep(usec);
 }
 
-u64 __attribute__((no_instrument_function)) os_get_nsec(void)
+uint64_t __attribute__((no_instrument_function)) os_get_nsec(void)
 {
 #if defined(CLOCK_MONOTONIC) && defined(_POSIX_MONOTONIC_CLOCK)
        struct timespec tp;
index 8665f70edb4d068505de4f4af23971a7cb936213..950433daa32dbabce603e3a4941d142162e5506b 100644 (file)
@@ -11,6 +11,8 @@
 #ifndef __OS_H__
 #define __OS_H__
 
+#include <linux/types.h>
+
 struct sandbox_state;
 
 /**
@@ -116,7 +118,7 @@ void os_usleep(unsigned long usec);
  *
  * \return A monotonic increasing time scaled in nano seconds
  */
-u64 os_get_nsec(void);
+uint64_t os_get_nsec(void);
 
 /**
  * Parse arguments and update sandbox state.