lkml.org 
[lkml]   [2009]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] new kqueue API v.08
    On Sun, Dec 20, 2009 at 12:25:15AM +0100, Stefani Seibold wrote:
    > Am Samstag, den 19.12.2009, 12:36 +0100 schrieb Andi Kleen:
    > > I like the basic idea of a type safe FIFO.
    > >
    > > > #define DYNAMIC
    > > > #ifdef DYNAMIC
    > > > static DECLARE_KFIFO_PTR(test[1], int);
    > > > #else
    > > > static DECLARE_KFIFO(test[1], int, FIFO_SIZE);
    > >
    > > The [1] looks weird. Is that really needed and what does it mean?
    > > The callers below don't seem to use it like an array.
    >
    > I am a lazy girl. This is only for convenient, because i don't want to
    > write always kfifo_....(&test...). Using an array of [1] provide the
    > pointer automaticly. Of course you can also write
    >
    > static DECLARE_KFIFO(test, int, FIFO_SIZE);
    >
    > and then call the kfifo macros with the address of the variable.

    So you want test[0] then, not test[1]. Or I'm missing something.

    Also, the subject of your mail was a bit misleading, it was talking
    about "kqueue" (which is the equivalent of epoll on BSD systems),
    while everywhere in the code we see kfifo. I think you simply changed
    the name recently for kfifo in fact.

    Willy



    \
     
     \ /
      Last update: 2009-12-20 06:25    [W:0.019 / U:120.032 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site