[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080730175138.GA12800@pingi.kke.suse.de>
Date: Wed, 30 Jul 2008 19:51:38 +0200
From: Karsten Keil <kkeil@...e.de>
To: David Woodhouse <dwmw2@...radead.org>
Cc: isdn4linux@...tserv.isdn4linux.de,
Marcel Holtmann <marcel@...tmann.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mISDN cleanup user interface
On Wed, Jul 30, 2008 at 05:57:01PM +0100, David Woodhouse wrote:
> On Wed, 2008-07-30 at 18:33 +0200, Karsten Keil wrote:
> > What about this implementation ?
>
> Looks a lot saner... although it does seem to confirm my earlier
> suspicion that you're not even _using_ the fact that it's a bitmap at
> all. You set the bits for the present channels at init time, which are
> always contiguous, and you never seem to change them them later -- why
> couldn't you do this with a simple 'number of channels' integer?
No it is not contineous on different PRI line setups (E1,T1 ...)
e.g a E1 has the D-channel on channel 15 position, so this bit is not set
then. My idea was, that with such a bitmap, applictions do not need to know
anything about the different channel layouts, it can use the map as base to assign
or validate a channel numbers.
>
> Are you later intending to use the bitmap to mark them as busy/free?
>
Yes exactely, and this was the reason why the original code (which used one u_long
only as channelmap) already used the bit operators, since for a channel allocator
you should be atomic, but since we are now allow 127 channels we need proper
locking for the busy/free map anyways and so we do not need atomic operation
here.
--
Karsten Keil
SuSE Labs
ISDN and VOIP development
SUSE LINUX Products GmbH, Maxfeldstr.5 90409 Nuernberg, GF: Markus Rex, HRB 16746 (AG Nuernberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists