mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] hrtimer: create and use timespec_valid macro
add timespec_valid(ts) [returns false if the timespec is denorm] Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
2a69897194
commit
5f82b2b77e
2 changed files with 8 additions and 3 deletions
|
@ -44,6 +44,12 @@ extern unsigned long mktime(const unsigned int year, const unsigned int mon,
|
|||
|
||||
extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec);
|
||||
|
||||
/*
|
||||
* Returns true if the timespec is norm, false if denorm:
|
||||
*/
|
||||
#define timespec_valid(ts) \
|
||||
(((ts)->tv_sec >= 0) && (((unsigned) (ts)->tv_nsec) < NSEC_PER_SEC))
|
||||
|
||||
extern struct timespec xtime;
|
||||
extern struct timespec wall_to_monotonic;
|
||||
extern seqlock_t xtime_lock;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue