mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 21:21:09 +00:00
[PATCH] hrtimers: namespace and enum cleanup
- hrtimers did not use the hrtimer_restart enum and relied on the implict int representation. Fix the prototypes and the functions using the enums. - Use seperate name spaces for the enumerations - Convert hrtimer_restart macro to inline function - Add comments No functional changes. [akpm@osdl.org: fix input driver] Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: john stultz <johnstul@us.ibm.com> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
fd064b9b77
commit
c9cb2e3d7c
9 changed files with 40 additions and 34 deletions
|
@ -145,7 +145,7 @@ static int common_timer_set(struct k_itimer *, int,
|
|||
struct itimerspec *, struct itimerspec *);
|
||||
static int common_timer_del(struct k_itimer *timer);
|
||||
|
||||
static int posix_timer_fn(struct hrtimer *data);
|
||||
static enum hrtimer_restart posix_timer_fn(struct hrtimer *data);
|
||||
|
||||
static struct k_itimer *lock_timer(timer_t timer_id, unsigned long *flags);
|
||||
|
||||
|
@ -334,12 +334,12 @@ EXPORT_SYMBOL_GPL(posix_timer_event);
|
|||
|
||||
* This code is for CLOCK_REALTIME* and CLOCK_MONOTONIC* timers.
|
||||
*/
|
||||
static int posix_timer_fn(struct hrtimer *timer)
|
||||
static enum hrtimer_restart posix_timer_fn(struct hrtimer *timer)
|
||||
{
|
||||
struct k_itimer *timr;
|
||||
unsigned long flags;
|
||||
int si_private = 0;
|
||||
int ret = HRTIMER_NORESTART;
|
||||
enum hrtimer_restart ret = HRTIMER_NORESTART;
|
||||
|
||||
timr = container_of(timer, struct k_itimer, it.real.timer);
|
||||
spin_lock_irqsave(&timr->it_lock, flags);
|
||||
|
@ -722,7 +722,7 @@ common_timer_set(struct k_itimer *timr, int flags,
|
|||
if (!new_setting->it_value.tv_sec && !new_setting->it_value.tv_nsec)
|
||||
return 0;
|
||||
|
||||
mode = flags & TIMER_ABSTIME ? HRTIMER_ABS : HRTIMER_REL;
|
||||
mode = flags & TIMER_ABSTIME ? HRTIMER_MODE_ABS : HRTIMER_MODE_REL;
|
||||
hrtimer_init(&timr->it.real.timer, timr->it_clock, mode);
|
||||
timr->it.real.timer.function = posix_timer_fn;
|
||||
|
||||
|
@ -734,7 +734,7 @@ common_timer_set(struct k_itimer *timr, int flags,
|
|||
/* SIGEV_NONE timers are not queued ! See common_timer_get */
|
||||
if (((timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE)) {
|
||||
/* Setup correct expiry time for relative timers */
|
||||
if (mode == HRTIMER_REL)
|
||||
if (mode == HRTIMER_MODE_REL)
|
||||
timer->expires = ktime_add(timer->expires,
|
||||
timer->base->get_time());
|
||||
return 0;
|
||||
|
@ -950,7 +950,8 @@ static int common_nsleep(const clockid_t which_clock, int flags,
|
|||
struct timespec *tsave, struct timespec __user *rmtp)
|
||||
{
|
||||
return hrtimer_nanosleep(tsave, rmtp, flags & TIMER_ABSTIME ?
|
||||
HRTIMER_ABS : HRTIMER_REL, which_clock);
|
||||
HRTIMER_MODE_ABS : HRTIMER_MODE_REL,
|
||||
which_clock);
|
||||
}
|
||||
|
||||
asmlinkage long
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue