summaryrefslogtreecommitdiff
path: root/nuttx/netutils/thttpd/fdwatch.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-08-16 15:26:52 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-08-16 15:26:52 +0000
commitf7dc3983bd12bafc5534beb1315b6aa6daedfe71 (patch)
tree6abd9103183f385fd391e56fe1ff55209dc7a768 /nuttx/netutils/thttpd/fdwatch.h
parent5bb6b9a9ce3e23fbf871eddfa2a7d6df50f446af (diff)
downloadpx4-nuttx-f7dc3983bd12bafc5534beb1315b6aa6daedfe71.tar.gz
px4-nuttx-f7dc3983bd12bafc5534beb1315b6aa6daedfe71.tar.bz2
px4-nuttx-f7dc3983bd12bafc5534beb1315b6aa6daedfe71.zip
Modify THTTPD to avoid poll() for write ready
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2026 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/netutils/thttpd/fdwatch.h')
-rw-r--r--nuttx/netutils/thttpd/fdwatch.h24
1 files changed, 9 insertions, 15 deletions
diff --git a/nuttx/netutils/thttpd/fdwatch.h b/nuttx/netutils/thttpd/fdwatch.h
index 4f960b56c..4a87c3280 100644
--- a/nuttx/netutils/thttpd/fdwatch.h
+++ b/nuttx/netutils/thttpd/fdwatch.h
@@ -58,21 +58,15 @@
* Private Types
****************************************************************************/
-struct fw_fd_s
-{
- uint8 rw; /* Read or write fd */
- void *data; /* Retained client data */
-};
-
struct fdwatch_s
{
- struct pollfd *pollfds; /* Poll data */
- struct fw_fd_s *client; /* Client data */
- uint8 *ready; /* The list of fds with activity */
- uint8 nfds; /* The configured maximum number of fds */
- uint8 nwatched; /* The number of fds currently watched */
- uint8 nactive; /* The number of fds with activity */
- uint8 next; /* The index to the next client data */
+ struct pollfd *pollfds; /* Poll data */
+ void **client; /* Client data */
+ uint8 *ready; /* The list of fds with activity */
+ uint8 nfds; /* The configured maximum number of fds */
+ uint8 nwatched; /* The number of fds currently watched */
+ uint8 nactive; /* The number of fds with activity */
+ uint8 next; /* The index to the next client data */
};
/****************************************************************************
@@ -87,9 +81,9 @@ extern struct fdwatch_s *fdwatch_initialize(int nfds);
extern void fdwatch_uninitialize(struct fdwatch_s *fw);
-/* Add a descriptor to the watch list. rw is either FDW_READ or FDW_WRITE. */
+/* Add a descriptor to the watch list */
-extern void fdwatch_add_fd(struct fdwatch_s *fw, int fd, void *client_data, int rw);
+extern void fdwatch_add_fd(struct fdwatch_s *fw, int fd, void *client_data);
/* Delete a descriptor from the watch list. */