Deleted Added
full compact
29c29
< * $Id: subr_rman.c,v 1.5 1999/03/29 08:30:17 dfr Exp $
---
> * $Id: subr_rman.c,v 1.6 1999/04/11 02:27:06 eivind Exp $
65d64
< #include <sys/rman.h>
66a66,67
> #include <machine/bus.h>
> #include <sys/rman.h>
75a77
> static int int_rman_deactivate_resource(struct resource *r);
119a122
> bzero(r, sizeof *r);
151c154,155
< if (r->r_flags & RF_ALLOCATED)
---
> if (r->r_flags & RF_ALLOCATED) {
> simple_unlock(rm->rm_slock);
152a157
> }
257c262
< rv = malloc(sizeof *r, M_RMAN, M_NOWAIT);
---
> rv = malloc(sizeof *rv, M_RMAN, M_NOWAIT);
259a265
> bzero(rv, sizeof *rv);
264a271
> rv->r_rm = rm;
282a290
> bzero(r, sizeof *r);
287a296
> r->r_rm = rm;
344a354
> bzero(rv, sizeof *rv);
358a369
> bzero(s->r_sharehead, sizeof *s->r_sharehead);
454c465
< return (rv);
---
> return (rv); /* returns with simplelock */
477,478c488,489
< int
< rman_deactivate_resource(struct resource *r)
---
> static int
> int_rman_deactivate_resource(struct resource *r)
483d493
< simple_lock(rm->rm_slock);
488a499,509
> return 0;
> }
>
> int
> rman_deactivate_resource(struct resource *r)
> {
> struct rman *rm;
>
> rm = r->r_rm;
> simple_lock(rm->rm_slock);
> int_rman_deactivate_resource(r);
499c520
< return EBUSY;
---
> int_rman_deactivate_resource(r);