diff options
author | sam <sam@FreeBSD.org> | 2008-08-02 17:42:38 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2008-08-02 17:42:38 +0000 |
commit | f28149353a8d84e6d26ce1feac18f3225125ceaf (patch) | |
tree | 48979d511003bfcad58592aad5b0356bc70e5cb0 /sys/kern/kern_timeout.c | |
parent | dd6ada0389c465aff31058de6e40459dc9fc559b (diff) | |
download | FreeBSD-src-f28149353a8d84e6d26ce1feac18f3225125ceaf.zip FreeBSD-src-f28149353a8d84e6d26ce1feac18f3225125ceaf.tar.gz |
add callout_schedule; besides being useful it also improves
compatibility with other systems
Reviewed by: ed, battlez
Diffstat (limited to 'sys/kern/kern_timeout.c')
-rw-r--r-- | sys/kern/kern_timeout.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index ec540c5..fe05d2c 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -616,6 +616,21 @@ retry: return (cancelled); } +/* + * Common idioms that can be optimized in the future. + */ +int +callout_schedule_on(struct callout *c, int to_ticks, int cpu) +{ + return callout_reset_on(c, to_ticks, c->c_func, c->c_arg, cpu); +} + +int +callout_schedule(struct callout *c, int to_ticks) +{ + return callout_reset_on(c, to_ticks, c->c_func, c->c_arg, c->c_cpu); +} + int _callout_stop_safe(c, safe) struct callout *c; |