Re: cbuf implementation
"François Revol" <[email protected]>
| Newsgroups | gmane.os.openbeos.kernel.devel |
|---|---|
| Message-ID | <6019879727-BeMail@patrick> |
> I just had another look at our cbuf implementation, and on how it is > used: > it seems that everyone (excluding the ports subsystem) has taken cbuf > to be more or less a circular buffer. But it is not - it was used > completely wrong everywhere, and is used very inefficient by the > ports > implementation. That's BTW why the keyboard and mouse drivers don't > work as expected - it's less obvious in the keyboard driver, as it > overwrites the same byte over and over again (instead of buffering > the > input), but the mouse driver only writes to byte 1 and reads out 3 > bytes as a packet - go figure. > > IOW we don't need our cbuf implementation - we need something that we > are already using but don't have :) > In case anyone steps up now, you have the job, if not, I'll be doing > it. Unless I hear something else in the mean time, I start doing it > in > around 5 hours. Yesterday: [19:42] *** geist (~geist@xxx) has joined the channel. [19:42] <geist> hrm. no axeld [19:43] <mmu_man> not until 1am [19:43] <mmu_man> :) [19:43] <geist> just read his mail [19:43] <geist> oh my god it's fucked up [19:43] <geist> looked at the source. people are using cbufs all over theplace [19:44] <geist> thankfully nothing in my code thus far is using it incorrectly, but for whatever reason someone seems to have copied my keyboard and mouse driver and fucked it all up , and left both copies in the tree [19:44] <geist> ie, keyboard.c and atkeyboard.c [19:44] <mmu_man> go slap korli [19:45] <mmu_man> seems he escaped [19:47] <geist> yeah the cbuf implementation is used heavily by the net stack you guys didn't take [19:47] <geist> it's not very useful outside of that [19:49] <geist> well anwyay, when axeld comes around tell him good find and tear it up! [19:49] *** geist has left the channel. Btw, could something like the ringbuff.c in npipefs suit your need ? François. ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click