sandbox: Use uint64_t instead of u64 for time
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>
This commit is contained in:
parent
c2e5e802ec
commit
2a54d1599f
|
@ -8,6 +8,7 @@
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
@ -136,7 +137,7 @@ void os_usleep(unsigned long usec)
|
||||||
usleep(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)
|
#if defined(CLOCK_MONOTONIC) && defined(_POSIX_MONOTONIC_CLOCK)
|
||||||
struct timespec tp;
|
struct timespec tp;
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
#ifndef __OS_H__
|
#ifndef __OS_H__
|
||||||
#define __OS_H__
|
#define __OS_H__
|
||||||
|
|
||||||
|
#include <linux/types.h>
|
||||||
|
|
||||||
struct sandbox_state;
|
struct sandbox_state;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -116,7 +118,7 @@ void os_usleep(unsigned long usec);
|
||||||
*
|
*
|
||||||
* \return A monotonic increasing time scaled in nano seconds
|
* \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.
|
* Parse arguments and update sandbox state.
|
||||||
|
|
Loading…
Reference in New Issue