--- Peter Wemm <[EMAIL PROTECTED]> wrote:
> > -- Hiten Pandya <[EMAIL PROTECTED]> wrote:
> > Just wondering, are these the kind of problems which can be solved by
> > using the kqueue(2) mechanism, or am I talking nuts again?
> > 
> > Regards.
> 
> Yes, kqueue solves it nicely.  I overestimated the work required.  In
> fact, it looks like it would be quite easy to do.  There are three places
> that need work.
> src/util/events.c  (the main event loop, keeps a persistent select mast)
> src/util/readable.c (quick select-until-readable)
> src/util/writable.c (quick select-until-writable)
> 
> events.c is practically begging to be converted to kqueue as it has
> explicit init/register/unregister/loop type operation that allows callers
> to register/unregister callbacks for given fd's when they become readable
> or writable.  This is the exact scenario that kqueue is ideal for.
> 
> The other two are not heavily used and could quickly whip up their own mini
> kqueue for the task.

Sounds like a good task for someone with time in their hands. ;)
As an example: http://www.monkeys.com/freeware/kqueue-echo.c, someone might
find that useful.

Regards.

  -- Hiten Pandya
  -- <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to