diff options
author | phk <phk@FreeBSD.org> | 2005-09-28 18:06:25 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-09-28 18:06:25 +0000 |
commit | 48a3daa37c6443e81007d489a5a5df4ab2205b4d (patch) | |
tree | 93bbc1cddf41f301ccc4f06c37aa32c562ada9b3 /sys/kern | |
parent | 5f9e2766d4f292d097aa16237a8fa1e548a8f819 (diff) | |
download | FreeBSD-src-48a3daa37c6443e81007d489a5a5df4ab2205b4d.zip FreeBSD-src-48a3daa37c6443e81007d489a5a5df4ab2205b4d.tar.gz |
puc(4) does strange things to resources in order to fool the
subdrivers to hook up.
It should probably be rewritten to implement a simple bus to which
the sub drivers attach using some kind of hint.
Until then, provide a couple of crutch functions with big warning
signs so it can survive the recent changes to struct resource.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/subr_rman.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index 75d3e42..3083b0e 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -98,6 +98,31 @@ int_alloc_resource(int malloc_flag) return (r); } +/* + * XXX: puc.c is a big hack. + * XXX: it should be rewritten to act like a bridge and offer + * XXX: its own resource manager. + * XXX: until somebody has time, help it out with these two functions + */ + +struct resource * +rman_secret_puc_alloc_resource(int malloc_flag) +{ + struct resource_i *r; + + r = int_alloc_resource(malloc_flag); + if (r) + return (&r->r_r); + return (NULL); +} + +void +rman_secret_puc_free_resource(struct resource *r) +{ + + free(r->__r_i, M_RMAN); +} + int rman_init(struct rman *rm) { |