Date: Tue, 22 May 2001 21:15:53 +0200 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: Brian Somers <brian@Awfulhak.org> Cc: freebsd-arch@FreeBSD.ORG Subject: Re: RFC: unit_list routines Message-ID: <72211.990558953@critter> In-Reply-To: Your message of "Tue, 22 May 2001 19:42:52 BST." <200105221842.f4MIgqb84117@hak.lan.Awfulhak.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Brian, Couldn't the resource manager used for interrupts and similar do this as well ? In message <200105221842.f4MIgqb84117@hak.lan.Awfulhak.org>, Brian Somers write s: >Hi, > >I want to change if_tun.c so that userland can open /dev/tun and get >back a /dev/tunX device. To do this, I need to track the units that >have (or haven't) been opened, and I figure other devices may wish to >do this too. > >To this end, I've written the attached URLs for > > /sys/kern/unit_list.c > /sys/sys/unit_list.h > >and have also attached URLs for patches to /sys/conf/files and >/sys/net/if_tun.c. > >The unit_list stuff is designed to be an easy way of tracking sparce >arrays of units - arrays that are generally expected to start at zero >and increment, but may sometimes be allocated randomly. > >I haven't tested as extensively as I plan to because my dev box is >useless at the moment due to mutex problems, but I believe it works :) > >I ansified if_tun.c while I was there - sorry if that complicates any >reviews :-/ > >Comments ? > > ftp://ftp.Awfulhak.org/pub/unit_list/sys-kern-unit_list.c > ftp://ftp.Awfulhak.org/pub/unit_list/sys-sys-unit_list.h > ftp://ftp.Awfulhak.org/pub/unit_list/sys-conf-files.patch > ftp://ftp.Awfulhak.org/pub/unit_list/sys-net-if_tun.c.patch > >Cheers. >-- >Brian <brian@Awfulhak.org> <brian@[uk.]FreeBSD.org> > <http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org> >Don't _EVER_ lose your sense of humour ! > > > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-arch" in the body of the message > -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?72211.990558953>