Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Apr 2000 22:30:31 -0700 (PDT)
From:      Matthew Dillon <>
To:        Jonathan Lemon <>
Cc:        Archie Cobbs <>,
Subject:   Re: RFC: kqueue API and rough code
Message-ID:  <>
References:  <> <> <> <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
    P.S.  please excuse me for getting so excitement, I think you know
    where I'm coming from and my last reply intimated otherwise.

    I really do think that passing/returning a pointer rather then doing
    a copyin/copyout is the way to go, and this is from serious experience
    in this area.  I have nearly 15 years of experience doing this sort
    of thing in real life embedded systems.

    I am going to put up a URL for a program module from one of my embedded
    projects to demonstrate the idea in real-life application code.  Keep
    in mind that the source file below is from an embedded application, 
    not a kernel.

    Please bring this up and search for 'setdispatch'.  Now the model this
    embedded system is using is an asynchronous software interrupt dispatch
    model, which I think is the best thing since sliced bread but is something
    that would not be easy to implement in UNIX.  

    What I would like you to look at is the use of a user data structure. 
    Check out the setop3() call just before second the setdispatch() call,
    then go down to the NetReadInt() procedure itself where the pointer to
    this structure is passed (by the kernel) to the dispatch function
    as 'arg'.

    This is the power of being able to either pass a user data pointer, or
    being able to supply it inherently by passing a pointer containing
    other information but extensible as a user structure, which is later

    If you have time you should look at the code in general... again, remember
    that I am not advocating kernel-aided dispatch via software interrupts,
    I am just using it as a demonstration of what our Goals should be.


To Unsubscribe: send mail to
with "unsubscribe freebsd-arch" in the body of the message

Want to link to this message? Use this URL: <>