Channel Patch

Damien Miller djm at mindrot.org
Wed Aug 8 14:04:32 EST 2007


On Tue, 7 Aug 2007, Peter Stuge wrote:

> On Tue, Aug 07, 2007 at 12:51:46PM -0400, Chris Rapier wrote:
> > > If you wanted to be tricky, you could add a precomputed skip step
> > > to the channels array that would point to the next allocated
> > > channel, allowing the loop to skip past unused channels.
> > 
> > One thing I'm not is tricky. I always end up confusing myself.
> > Mostly I  just write this stuff as research projects in the hope
> > that it interests someone else enough to actual code things
> > properly :)
> 
> The step optimization is really simple and still allows index
> lookups. The step works just like a pointer in the linked list.
> 
> As long as individual channel entries do not need to be atomically
> inserted or removed it'll work great!

Since OpenSSH is single-threaded, there is no need to worry about
concurrent modifications to the channel array.

-d


More information about the openssh-unix-dev mailing list