summaryrefslogtreecommitdiff
path: root/nuttx/fs
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-18 17:30:30 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-18 17:30:30 +0000
commit1994f6983332bf79b4ea8d3f242dc710f99cf2e9 (patch)
tree414ecfd618101a507bf1b3c9263cd067b2ad7b9b /nuttx/fs
parent3a3f46b691da1747881032dec6f5b5af2c308cdd (diff)
downloadpx4-nuttx-1994f6983332bf79b4ea8d3f242dc710f99cf2e9.tar.gz
px4-nuttx-1994f6983332bf79b4ea8d3f242dc710f99cf2e9.tar.bz2
px4-nuttx-1994f6983332bf79b4ea8d3f242dc710f99cf2e9.zip
Implement poll/select for sockets
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1277 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs')
-rw-r--r--nuttx/fs/fs_poll.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nuttx/fs/fs_poll.c b/nuttx/fs/fs_poll.c
index 84d20efe8..9cf6486c1 100644
--- a/nuttx/fs/fs_poll.c
+++ b/nuttx/fs/fs_poll.c
@@ -93,7 +93,7 @@ static void poll_semtake(FAR sem_t *sem)
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
-static int poll_fdsetup(int fd, FAR struct pollfd *fds)
+static int poll_fdsetup(int fd, FAR struct pollfd *fds, boolean setup)
{
FAR struct filelist *list;
FAR struct file *this_file;
@@ -137,7 +137,7 @@ static int poll_fdsetup(int fd, FAR struct pollfd *fds)
{
/* Yes, then setup the poll */
- ret = (int)inode->u.i_ops->poll(this_file, fds);
+ ret = (int)inode->u.i_ops->poll(this_file, fds, setup);
}
return ret;
}
@@ -168,7 +168,7 @@ static inline int poll_setup(FAR struct pollfd *fds, nfds_t nfds, sem_t *sem)
/* Set up the poll */
- ret = poll_fdsetup(fds[i].fd, &fds[i]);
+ ret = poll_fdsetup(fds[i].fd, &fds[i], TRUE);
if (ret < 0)
{
return ret;
@@ -201,7 +201,7 @@ static inline int poll_teardown(FAR struct pollfd *fds, nfds_t nfds, int *count)
{
/* Teardown the poll */
- status = poll_fdsetup(fds[i].fd, NULL);
+ status = poll_fdsetup(fds[i].fd, &fds[i], FALSE);
if (status < 0)
{
ret = status;