public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Trenton D. Adams" <tadams@extremeeng.com>
To: "'Jonathan Larmour'" <jlarmour@redhat.com>
Cc: "'eCos Discussion'" <ecos-discuss@sourceware.cygnus.com>
Subject: RE: [ECOS] select () confusion
Date: Thu, 02 Aug 2001 15:30:00 -0000	[thread overview]
Message-ID: <000701c11ba2$c23aa640$090110ac@TRENT> (raw)
In-Reply-To: <3B69CE88.1137051E@redhat.com>

  > 
  > Yeah, that's because the reason it was there originally was for
  > efficiency,
  > and we know that's not relevant for Windows ;).
  > 
LMAO, I agree.  But, doesn't that assume that the programmer actually
knows how to program efficiently?  I mean wouldn't it be more efficient
for someone that knows what efficient is to do this internally?

  > >  Since FD_SET always
  > > increments the fd count anyhow, I don't see a point in even using
the
  > > first parameter.
  > 
  > Eh? FD_SET doesn't change the value of the highest fd you will be
  > selecting
  > on, or the number of fds you have. It just sets a bit in a bitmask
(the
  > fdset).
  > 

Oh, I was referring to the windows docs.  I guess they are completely
different.  I can definitely see why that would be efficient now.  After
all, an fd_set in eCos is only an array of integer masks.  Bit
manipulation is much faster than going through an array of SOCKETs.

eCos fd_set
typedef	struct fd_set {
	fd_mask	fds_bits[__howmany(FD_SETSIZE, __NFDBITS)];
} fd_set;

windows fd_set (LMAO, they suck)
typedef struct fd_set {
  u_int    fd_count;                 // how many are SET? 
  SOCKET   fd_array[FD_SETSIZE];     // an array of SOCKETs 
} fd_set;


And, infact windows does increment an fdcount! :) LOL

      reply	other threads:[~2001-08-02 15:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-02 14:28 Trenton D. Adams
2001-08-02 14:49 ` Jonathan Larmour
2001-08-02 14:55   ` Trenton D. Adams
2001-08-02 15:05     ` Jonathan Larmour
2001-08-02 15:30       ` Trenton D. Adams [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000701c11ba2$c23aa640$090110ac@TRENT' \
    --to=tadams@extremeeng.com \
    --cc=ecos-discuss@sourceware.cygnus.com \
    --cc=jlarmour@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).