Commit e75148dc authored by Pavel Emelyanov's avatar Pavel Emelyanov

util: Move user-per-sec constant into util.h header

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 3e8b82d3
...@@ -1370,8 +1370,6 @@ static long restorer_get_vma_hint(pid_t pid, struct list_head *tgt_vma_list, ...@@ -1370,8 +1370,6 @@ static long restorer_get_vma_hint(pid_t pid, struct list_head *tgt_vma_list,
return -1; return -1;
} }
#define USEC_PER_SEC 1000000L
static inline int timeval_valid(struct timeval *tv) static inline int timeval_valid(struct timeval *tv)
{ {
return (tv->tv_sec >= 0) && ((unsigned long)tv->tv_usec < USEC_PER_SEC); return (tv->tv_sec >= 0) && ((unsigned long)tv->tv_usec < USEC_PER_SEC);
......
...@@ -275,4 +275,6 @@ static inline bool dir_dots(struct dirent *de) ...@@ -275,4 +275,6 @@ static inline bool dir_dots(struct dirent *de)
extern int read_fd_link(int lfd, char *buf, size_t size); extern int read_fd_link(int lfd, char *buf, size_t size);
#define USEC_PER_SEC 1000000L
#endif /* __CR_UTIL_H__ */ #endif /* __CR_UTIL_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment