Skip to content

Commit

Permalink
um: fix os_timer_one_shot()
Browse files Browse the repository at this point in the history
os_timer_one_shot() gets passed a value "unsigned long delta",
so must not have an "int ticks" as that actually ends up being
-1, and thus triggering a timer over and over again.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
  • Loading branch information
Johannes Berg authored and Richard Weinberger committed Jul 2, 2019
1 parent bebe468 commit fcd242c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/um/include/shared/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ extern void os_warn(const char *fmt, ...)
extern void os_idle_sleep(unsigned long long nsecs);
extern int os_timer_create(void* timer);
extern int os_timer_set_interval(void* timer, void* its);
extern int os_timer_one_shot(int ticks);
extern int os_timer_one_shot(unsigned long ticks);
extern long long os_timer_disable(void);
extern long os_timer_remain(void* timer);
extern void uml_idle_timer(void);
Expand Down
2 changes: 1 addition & 1 deletion arch/um/os-Linux/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ long os_timer_remain(void* timer)
return its.it_value.tv_nsec;
}

int os_timer_one_shot(int ticks)
int os_timer_one_shot(unsigned long ticks)
{
struct itimerspec its;
unsigned long long nsec;
Expand Down

0 comments on commit fcd242c

Please sign in to comment.