subr_rman.c (f6233520ce14409a963eba847fba0265f40ce820) subr_rman.c (f1d19042b082d95f07a0027e596ba2405aa8a9a5)
1/*
2 * Copyright 1998 Massachusetts Institute of Technology
3 *
4 * Permission to use, copy, modify, and distribute this software and
5 * its documentation for any purpose and without fee is hereby
6 * granted, provided that both the above copyright notice and this
7 * permission notice appear in all copies, that both the above
8 * copyright notice and this permission notice appear in all

--- 12 unchanged lines hidden (view full) ---

21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*
2 * Copyright 1998 Massachusetts Institute of Technology
3 *
4 * Permission to use, copy, modify, and distribute this software and
5 * its documentation for any purpose and without fee is hereby
6 * granted, provided that both the above copyright notice and this
7 * permission notice appear in all copies, that both the above
8 * copyright notice and this permission notice appear in all

--- 12 unchanged lines hidden (view full) ---

21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $Id: subr_rman.c,v 1.1 1998/10/29 01:48:36 wollman Exp $
29 * $Id: subr_rman.c,v 1.2 1998/11/23 09:33:35 bde Exp $
30 */
31
32/*
33 * The kernel resource manager. This code is responsible for keeping track
34 * of hardware resources which are apportioned out to various drivers.
35 * It does not actually assign those resources, and it is not expected
36 * that end-device drivers will call into this code directly. Rather,
37 * the code which implements the buses that those devices are attached to,

--- 36 unchanged lines hidden (view full) ---

74static int int_rman_release_resource(struct rman *rm, struct resource *r);
75
76#define CIRCLEQ_TERMCOND(var, head) (var == (void *)&(head))
77
78int
79rman_init(struct rman *rm)
80{
81 static int once;
30 */
31
32/*
33 * The kernel resource manager. This code is responsible for keeping track
34 * of hardware resources which are apportioned out to various drivers.
35 * It does not actually assign those resources, and it is not expected
36 * that end-device drivers will call into this code directly. Rather,
37 * the code which implements the buses that those devices are attached to,

--- 36 unchanged lines hidden (view full) ---

74static int int_rman_release_resource(struct rman *rm, struct resource *r);
75
76#define CIRCLEQ_TERMCOND(var, head) (var == (void *)&(head))
77
78int
79rman_init(struct rman *rm)
80{
81 static int once;
82 struct resource *r;
83
84 if (once == 0) {
85 once = 1;
86 TAILQ_INIT(&rman_head);
87 simple_lock_init(&rman_lock);
88 }
89
90 if (rm->rm_type == RMAN_UNINIT)

--- 500 unchanged lines hidden ---
82
83 if (once == 0) {
84 once = 1;
85 TAILQ_INIT(&rman_head);
86 simple_lock_init(&rman_lock);
87 }
88
89 if (rm->rm_type == RMAN_UNINIT)

--- 500 unchanged lines hidden ---