lkml.org 
[lkml]   [2005]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [UPDATE PATCH] Add schedule_timeout_{interruptible,uninterruptible}_msecs() interfaces
Nishanth Aravamudan <nacc@us.ibm.com> wrote:
>
>
> +/*
> + * schedule_timeout_msecs - sleep until timeout
> + * @timeout_msecs: timeout value in milliseconds
> + *
> + * A human-time (but otherwise identical) alternative to
> + * schedule_timeout() The state, therefore, *does* need to be set before
> + * calling this function, but this function should *never* be called
> + * directly. Use the nice wrappers, schedule_{interruptible,
> + * uninterruptible}_timeout_msecs().
> + *
> + * See the comment for schedule_timeout() for details.
> + */
> +inline unsigned int __sched schedule_timeout_msecs(unsigned int timeout_msecs)
> +{

Making this inline will add more kernel text. Can't we uninline it?

I'm surprised that this function is not implemented as a call to the
existing schedule_timeout()?

> + init_timer(&timer);
> + timer.expires = expire_jifs;
> + timer.data = (unsigned long) current;
> + timer.function = process_timeout;

hm, if we add the needed typecast to TIMER_INITIALIZER() the above could be

timer = TIMER_INITIALIZER(process_timeout, expire_jifs,
(unsigned long)current);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-23 04:35    [W:0.068 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site