Initial integration of poll()

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1266 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2008-11-17 20:27:26 +00:00
parent e4922667b2
commit acbefdbb30
2 changed files with 24 additions and 8 deletions
+15 -4
View File
@@ -89,14 +89,25 @@
* Public Type Definitions
****************************************************************************/
/* The number of poll descriptors (required by poll() specification */
typedef unsigned int nfds_t;
/* In the standard poll() definition, the size of the event set is 'short'.
* Here we pick the smallest storage element that will contain all of the
* poll events.
*/
typedef ubyte pollevent_t;
/* This is the Nuttx variant of the standard pollfd structure. */
struct pollfd
{
int fd; /* The descriptor being polled */
sem_t *sem; /* Pointer to semaphore used to post output event */
ubyte events; /* The input event flags */
ubyte revents; /* The output event flags */
int fd; /* The descriptor being polled */
sem_t *sem; /* Pointer to semaphore used to post output event */
pollevent_t events; /* The input event flags */
pollevent_t revents; /* The output event flags */
};
/****************************************************************************