Add placeholder mutex argument to new_unrhdr().
This commit is contained in:
parent
eadc2898f6
commit
18d1a64228
@ -810,7 +810,7 @@ gpib_ib_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
|
||||
ib = malloc(sizeof *ib, M_IBFOO, M_WAITOK | M_ZERO);
|
||||
LIST_INIT(&ib->handles);
|
||||
callout_init(&ib->callout, 1);
|
||||
ib->unrhdr = new_unrhdr(0, INT_MAX);
|
||||
ib->unrhdr = new_unrhdr(0, INT_MAX, NULL);
|
||||
dev->si_drv2 = ib;
|
||||
ib->u = u;
|
||||
u->ibfoo = ib;
|
||||
|
@ -292,7 +292,7 @@ static void
|
||||
led_drvinit(void *unused)
|
||||
{
|
||||
|
||||
led_unit = new_unrhdr(0, minor2unit(MAXMINOR));
|
||||
led_unit = new_unrhdr(0, minor2unit(MAXMINOR), NULL);
|
||||
mtx_init(&led_mtx, "LED mtx", NULL, MTX_DEF);
|
||||
sx_init(&led_sx, "LED sx");
|
||||
callout_init(&led_ch, CALLOUT_MPSAFE);
|
||||
|
@ -88,8 +88,7 @@ static void
|
||||
g_dev_init(struct g_class *mp)
|
||||
{
|
||||
|
||||
/* XXX: should have a #define MAX_UNIT_MINOR */
|
||||
unithdr = new_unrhdr(0, 0xffffff);
|
||||
unithdr = new_unrhdr(0, minor2unit(MAXMINOR), NULL);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -198,7 +198,7 @@ delete_unr(struct unrhdr *uh, void *ptr)
|
||||
*/
|
||||
|
||||
struct unrhdr *
|
||||
new_unrhdr(u_int low, u_int high)
|
||||
new_unrhdr(u_int low, u_int high, struct mtx *mutex __unused)
|
||||
{
|
||||
struct unrhdr *uh;
|
||||
struct unr *up;
|
||||
@ -583,7 +583,7 @@ main(int argc __unused, const char **argv __unused)
|
||||
int i, x, m;
|
||||
char a[NN];
|
||||
|
||||
uh = new_unrhdr(0, NN - 1);
|
||||
uh = new_unrhdr(0, NN - 1, NULL);
|
||||
|
||||
memset(a, 0, sizeof a);
|
||||
|
||||
|
@ -2903,7 +2903,7 @@ ttycreate(struct tty *tp, struct cdevsw *csw, int unit, int flags, const char *f
|
||||
mtx_assert(&Giant, MA_OWNED);
|
||||
|
||||
if (tty_unit == NULL)
|
||||
tty_unit = new_unrhdr(0, 0xffff);
|
||||
tty_unit = new_unrhdr(0, 0xffff, NULL);
|
||||
|
||||
sunit = alloc_unr(tty_unit);
|
||||
tp->t_devunit = sunit;
|
||||
|
@ -320,7 +320,7 @@ void DELAY(int usec);
|
||||
* Unit number allocation API. (kern/subr_unit.c)
|
||||
*/
|
||||
struct unrhdr;
|
||||
struct unrhdr *new_unrhdr(u_int low, u_int high);
|
||||
struct unrhdr *new_unrhdr(u_int low, u_int high, struct mtx *mutex);
|
||||
void delete_unrhdr(struct unrhdr *uh);
|
||||
u_int alloc_unr(struct unrhdr *uh);
|
||||
void free_unr(struct unrhdr *uh, u_int item);
|
||||
|
Loading…
x
Reference in New Issue
Block a user