From: Jonathan Larmour <jlarmour@redhat.com>
To: tsmith@megaroms.co.uk
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] poll.h and polling stuff???
Date: Tue, 24 Jul 2001 06:37:00 -0000 [thread overview]
Message-ID: <3B5D7A31.639872E5@redhat.com> (raw)
In-Reply-To: <20010724123023.agsplanning+tsmith@f9>
tsmith@megaroms.co.uk wrote:
>
> [i'm still very new to ecos]
>
> to add poll() i think i need to
> a) alter the cdl for the fileio package to compile poll.cxx
> b) write poll.cxx in the same directory as select.cxx
It may be easier just to add poll() to select.cxx. From what I remember
when poll() is available, select() is normally implemented in terms of
poll(). So the current select() would be modified to be poll(), and you
would add a new select() that wraps it. Probably :-).
> How do i get a poll.h file to appear in my ecos build? fileio.h doesn't look like the place to add stuff.
The isoinfra package is intended to manage "top level" header files. The
net stack is an exception because that's imported code. Instead what would
happen is that isoinfra would have a poll.h that probably includes a header
fragment from the actual implementation in fileio.... or possibly just
provides a sensible default if there's an implementation. For example
isoinfra's poll.h could include:
#if CYGINT_ISO_POLL
# ifdef CYGBLD_ISO_POLL_HEADER
# include CYGBLD_ISO_POLL_HEADER
# else
struct pollfd {
int fd;
short events;
short revents;
};
typedef unsigned int nfds_t;
#define POLLIN 0x01
#define POLLRDNORM 0x02
#define POLLRDBAND 0x04
#define POLLPRI 0x08
#define POLLOUT 0x10
#define POLLWRNORM POLLOUT
#define POLLWRBAND 0x20
#define POLLERR 0x40
#define POLLHUP 0x80
#define POLLNVAL 0x100
#ifdef __cplusplus
extern "C" {
#endif
extern int
poll( struct pollfd /* fds */ [], nfds_t /* nfds */, int /* timeout */ );
#ifdef __cplusplus
} /* extern "C" */
#endif
# endif
#endif
You can probably just cut and paste the above.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions http://www.redhat-techworld.com/
next prev parent reply other threads:[~2001-07-24 6:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-24 4:29 tsmith
2001-07-24 5:14 ` Gary Thomas
2001-07-24 6:37 ` Jonathan Larmour [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-07-25 2:19 tsmith
2001-07-25 3:27 ` Robin Farine
2001-07-25 11:20 ` Jonathan Larmour
2001-07-25 1:43 tsmith
2001-07-24 8:07 tsmith
2001-07-24 8:05 tsmith
2001-07-23 5:57 tsmith
2001-07-23 6:05 ` Jonathan Larmour
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=3B5D7A31.639872E5@redhat.com \
--to=jlarmour@redhat.com \
--cc=ecos-discuss@sources.redhat.com \
--cc=tsmith@megaroms.co.uk \
/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).