Skip to content

Commit fcd242c

Browse files
jmberg-intelrichardweinberger
authored andcommitted
um: fix os_timer_one_shot()
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>
1 parent bebe468 commit fcd242c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎arch/um/include/shared/os.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ extern void os_warn(const char *fmt, ...)
252252
extern void os_idle_sleep(unsigned long long nsecs);
253253
extern int os_timer_create(void* timer);
254254
extern int os_timer_set_interval(void* timer, void* its);
255-
extern int os_timer_one_shot(int ticks);
255+
extern int os_timer_one_shot(unsigned long ticks);
256256
extern long long os_timer_disable(void);
257257
extern long os_timer_remain(void* timer);
258258
extern void uml_idle_timer(void);

‎arch/um/os-Linux/time.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ long os_timer_remain(void* timer)
113113
return its.it_value.tv_nsec;
114114
}
115115

116-
int os_timer_one_shot(int ticks)
116+
int os_timer_one_shot(unsigned long ticks)
117117
{
118118
struct itimerspec its;
119119
unsigned long long nsec;

0 commit comments

Comments
 (0)