Make the callout structure in the boot loader's kernel shim more

similar to the kernel one.

MFC after:	1 week
This commit is contained in:
Hans Petter Selasky 2016-09-14 11:16:00 +00:00
parent 276c74b29a
commit 8393643c27
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305804
2 changed files with 8 additions and 8 deletions

View File

@ -432,8 +432,8 @@ callout_callback(struct callout *c)
}
mtx_unlock(&mtx_callout);
if (c->func)
(c->func) (c->arg);
if (c->c_func != NULL)
(c->c_func) (c->c_arg);
if (!(c->flags & CALLOUT_RETURNUNLOCKED))
mtx_unlock(c->mtx);
@ -487,8 +487,8 @@ callout_reset(struct callout *c, int to_ticks,
{
callout_stop(c);
c->func = func;
c->arg = arg;
c->c_func = func;
c->c_arg = arg;
c->timeout = ticks + to_ticks;
mtx_lock(&mtx_callout);
@ -507,8 +507,8 @@ callout_stop(struct callout *c)
}
mtx_unlock(&mtx_callout);
c->func = NULL;
c->arg = NULL;
c->c_func = NULL;
c->c_arg = NULL;
}
void

View File

@ -299,8 +299,8 @@ extern volatile int ticks;
struct callout {
LIST_ENTRY(callout) entry;
callout_fn_t *func;
void *arg;
callout_fn_t *c_func;
void *c_arg;
struct mtx *mtx;
int flags;
int timeout;