Move poll storage slot from pollfd struct to socket struct

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1286 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2008-11-19 02:40:09 +00:00
parent 0f4896d7b8
commit 0985c273fa
3 changed files with 20 additions and 28 deletions
+7 -1
View File
@@ -95,6 +95,12 @@ struct socket
#endif
#endif
void *s_conn; /* Connection: struct uip_conn or uip_udp_conn */
/* The socket poll logic needs a place to retain state info */
#if !defined(CONFIG_DISABLE_POLL) && defined(CONFIG_NET_TCP) && CONFIG_NET_NTCP_READAHEAD_BUFFERS > 0
FAR void *private;
#endif
};
/* This defines a list of sockets indexed by the socket descriptor */
@@ -160,7 +166,7 @@ EXTERN int netdev_ioctl(int sockfd, int cmd, struct ifreq *req);
#ifndef CONFIG_DISABLE_POLL
struct pollfd; /* Forward reference -- see poll.h */
EXTERN int net_poll(int sockfd, struct pollfd *fds, boolean setup);
EXTERN int net_poll(int sockfd, struct pollfd *fds);
#endif
/* netdev-register.c *********************************************************/
-6
View File
@@ -108,12 +108,6 @@ struct pollfd
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 */
/* The socket poll logic needs a place to retain state info */
#if CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET_TCP) && CONFIG_NET_NTCP_READAHEAD_BUFFERS > 0
FAR void *private;
#endif
};
/****************************************************************************