freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Frediano Ziglio" <freddy77 AT gmail.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] always poll, even without poll(2)
- Date: Sat, 20 Dec 2008 14:12:18 +0100
2008/12/20 James K. Lowden <jklowden AT freetds.org>:
> I added src/replacements/fakepoll.c tonight. Quite a bit cleaner than
> what I found on the 'Net, if I do say so myself, but the guts are the
> same. You can learn a lot about poll/select by working on a function that
> does one in terms of the other.
>
> Currently it's named "fakepoll()" because when I named it "poll()", it
> supplanted poll(2) on my machine. (Quite helpful for debugging it, btw!)
> Clearly there's a little autoconf work ahead. (Freddy, if you know how to
> make fakepoll be used only when there's no poll(2), I'd be grateful if
> you'd show me. I didn't want to add the whole contents of fakepoll.h to
> replacements.h.)
>
Mmmm... I would put fakepoll.h in include/replacements directory. Also
there is similar function named tds_REPLACED so perhaps it would be
better to call this function tds_poll for coherence. Also for
coherence in include/replacements.h I used defines like
#define poll(a,b,c) tds_poll(a,b,c)
if poll is not defined. You could include
include/replacements/fakepoll.h in include/replacements.h or just
include <replacements/fakepoll.h> when used.
> Always having poll/fakepoll around will mean we can drop #if USE_POLL from
> the code, as well as all references to select(2). Probably we should
> rename tds_select to tds_poll at the same time....
>
well... or find a better name :) Currently tds_select does tree things:
- call select or poll to wait
- handle polling calls
- handle replies/cancellation
bye
freddy77
-
[freetds] always poll, even without poll(2),
James K. Lowden, 12/20/2008
-
Re: [freetds] always poll, even without poll(2),
Frediano Ziglio, 12/20/2008
-
Re: [freetds] always poll, even without poll(2),
James K. Lowden, 12/22/2008
- Re: [freetds] always poll, even without poll(2), Frediano Ziglio, 12/23/2008
-
Re: [freetds] always poll, even without poll(2),
Frediano Ziglio, 12/29/2008
- Re: [freetds] always poll, even without poll(2), James K. Lowden, 12/30/2008
-
Re: [freetds] always poll, even without poll(2),
James K. Lowden, 12/22/2008
-
Re: [freetds] always poll, even without poll(2),
Frediano Ziglio, 12/20/2008
Archive powered by MHonArc 2.6.24.