diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-12-15 19:00:40 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-12-15 19:00:40 +0000 |
commit | 08b2e5a5495fb08277274eaaf91c21069e0fbadf (patch) | |
tree | 8fd7037b0159064a937714529251eb34ec4f4e73 /nuttx/examples/poll/select_listener.c | |
parent | efcfa33c1fa5728dc7c8dd9fd9f20ed7d8a0b27a (diff) | |
download | px4-nuttx-08b2e5a5495fb08277274eaaf91c21069e0fbadf.tar.gz px4-nuttx-08b2e5a5495fb08277274eaaf91c21069e0fbadf.tar.bz2 px4-nuttx-08b2e5a5495fb08277274eaaf91c21069e0fbadf.zip |
Changing NuttX fixed size type names to C99 standard names -- things will be broken for awhile
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2351 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples/poll/select_listener.c')
-rw-r--r-- | nuttx/examples/poll/select_listener.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/nuttx/examples/poll/select_listener.c b/nuttx/examples/poll/select_listener.c index 85ff57a5e..80039ada3 100644 --- a/nuttx/examples/poll/select_listener.c +++ b/nuttx/examples/poll/select_listener.c @@ -42,7 +42,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <sys/select.h> - +#include <stdbool.h> #include <stdio.h> #include <unistd.h> #include <string.h> @@ -83,8 +83,8 @@ void *select_listener(pthread_addr_t pvarg) struct timeval tv; char buffer[64]; ssize_t nbytes; - boolean timeout; - boolean ready; + bool timeout; + bool ready; int fd; int ret; @@ -112,8 +112,8 @@ void *select_listener(pthread_addr_t pvarg) tv.tv_sec = SELECT_LISTENER_DELAY; tv.tv_usec = 0; - timeout = FALSE; - ready = FALSE; + timeout = false; + ready = false; ret = select(fd+1, (FAR fd_set*)&rfds, (FAR fd_set*)NULL, (FAR fd_set*)NULL, &tv); message("\nselect_listener: select returned: %d\n", ret); @@ -125,7 +125,7 @@ void *select_listener(pthread_addr_t pvarg) else if (ret == 0) { message("select_listener: Timeout\n"); - timeout = TRUE; + timeout = true; } else { @@ -135,7 +135,7 @@ void *select_listener(pthread_addr_t pvarg) } else { - ready = TRUE; + ready = true; } if (!FD_ISSET(fd, rfds)) @@ -176,8 +176,8 @@ void *select_listener(pthread_addr_t pvarg) message("select_listener: Read '%s' (%d bytes)\n", buffer, nbytes); } - timeout = FALSE; - ready = FALSE; + timeout = false; + ready = false; } while (nbytes > 0); |