Use integer type to pass around jiffies and/or ticks values in the
LinuxKPI because in FreeBSD ticks are 32-bit. MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
2e7c94900b
commit
853c517175
@ -61,8 +61,8 @@ struct completion {
|
||||
linux_completion_done(c)
|
||||
|
||||
extern void linux_complete_common(struct completion *, int);
|
||||
extern long linux_wait_for_common(struct completion *, int);
|
||||
extern long linux_wait_for_timeout_common(struct completion *, long, int);
|
||||
extern int linux_wait_for_common(struct completion *, int);
|
||||
extern int linux_wait_for_timeout_common(struct completion *, int, int);
|
||||
extern int linux_try_wait_for_completion(struct completion *);
|
||||
extern int linux_completion_done(struct completion *);
|
||||
|
||||
|
@ -141,7 +141,7 @@ get_jiffies_64(void)
|
||||
}
|
||||
|
||||
static inline int
|
||||
linux_timer_jiffies_until(unsigned long expires)
|
||||
linux_timer_jiffies_until(int expires)
|
||||
{
|
||||
int delta = expires - jiffies;
|
||||
/* guard against already expired values */
|
||||
|
@ -41,7 +41,7 @@ struct timer_list {
|
||||
struct callout timer_callout;
|
||||
void (*function) (unsigned long);
|
||||
unsigned long data;
|
||||
unsigned long expires;
|
||||
int expires;
|
||||
};
|
||||
|
||||
extern unsigned long linux_timer_hz_mask;
|
||||
@ -65,7 +65,7 @@ extern unsigned long linux_timer_hz_mask;
|
||||
callout_init(&(timer)->timer_callout, 1); \
|
||||
} while (0)
|
||||
|
||||
extern void mod_timer(struct timer_list *, unsigned long);
|
||||
extern void mod_timer(struct timer_list *, int);
|
||||
extern void add_timer(struct timer_list *);
|
||||
extern void add_timer_on(struct timer_list *, int cpu);
|
||||
|
||||
@ -73,7 +73,7 @@ extern void add_timer_on(struct timer_list *, int cpu);
|
||||
#define del_timer_sync(timer) callout_drain(&(timer)->timer_callout)
|
||||
#define timer_pending(timer) callout_pending(&(timer)->timer_callout)
|
||||
#define round_jiffies(j) \
|
||||
((unsigned long)(((j) + linux_timer_hz_mask) & ~linux_timer_hz_mask))
|
||||
((int)(((j) + linux_timer_hz_mask) & ~linux_timer_hz_mask))
|
||||
#define round_jiffies_relative(j) round_jiffies(j)
|
||||
#define round_jiffies_up(j) round_jiffies(j)
|
||||
#define round_jiffies_up_relative(j) round_jiffies_up(j)
|
||||
|
@ -1598,7 +1598,7 @@ linux_timer_callback_wrapper(void *context)
|
||||
}
|
||||
|
||||
void
|
||||
mod_timer(struct timer_list *timer, unsigned long expires)
|
||||
mod_timer(struct timer_list *timer, int expires)
|
||||
{
|
||||
|
||||
timer->expires = expires;
|
||||
@ -1660,10 +1660,10 @@ linux_complete_common(struct completion *c, int all)
|
||||
/*
|
||||
* Indefinite wait for done != 0 with or without signals.
|
||||
*/
|
||||
long
|
||||
int
|
||||
linux_wait_for_common(struct completion *c, int flags)
|
||||
{
|
||||
long error;
|
||||
int error;
|
||||
|
||||
if (SCHEDULER_STOPPED())
|
||||
return (0);
|
||||
@ -1700,10 +1700,11 @@ intr:
|
||||
/*
|
||||
* Time limited wait for done != 0 with or without signals.
|
||||
*/
|
||||
long
|
||||
linux_wait_for_timeout_common(struct completion *c, long timeout, int flags)
|
||||
int
|
||||
linux_wait_for_timeout_common(struct completion *c, int timeout, int flags)
|
||||
{
|
||||
long end = jiffies + timeout, error;
|
||||
int end = jiffies + timeout;
|
||||
int error;
|
||||
int ret;
|
||||
|
||||
if (SCHEDULER_STOPPED())
|
||||
|
Loading…
x
Reference in New Issue
Block a user