Module: xenomai-2.5
Branch: master
Commit: e5d83a81b5ff7e77e67c229e66c6057126702c01
URL:    
http://git.xenomai.org/?p=xenomai-2.5.git;a=commit;h=e5d83a81b5ff7e77e67c229e66c6057126702c01

Author: Alexis Berlemont <alexis.berlem...@gmail.com>
Date:   Thu Mar 18 23:36:48 2010 +0100

analogy: in cmd_{read, write}, replace a4l_sys_* by a4l_async_*

The function a4l_sys_read and a4l_sys_write are not the default
functions to use in common applications; a4l_async_read and
a4l_async_write were provided on that purpose.

---

 src/utils/analogy/cmd_read.c  |    3 +--
 src/utils/analogy/cmd_write.c |    2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/utils/analogy/cmd_read.c b/src/utils/analogy/cmd_read.c
index 1345f5b..ee65dc9 100644
--- a/src/utils/analogy/cmd_read.c
+++ b/src/utils/analogy/cmd_read.c
@@ -379,9 +379,8 @@ int main(int argc, char *argv[])
 
                /* Fetch data */
                do {
-
                        /* Perform the read operation */
-                       ret = a4l_sys_read(dsc.fd, buf, BUF_SIZE);
+                       ret = a4l_async_read(&dsc, buf, BUF_SIZE, A4L_INFINITE);
                        if (ret < 0) {
                                fprintf(stderr,
                                        "cmd_read: a4l_read failed (ret=%d)\n",
diff --git a/src/utils/analogy/cmd_write.c b/src/utils/analogy/cmd_write.c
index c76fa81..5ce9218 100644
--- a/src/utils/analogy/cmd_write.c
+++ b/src/utils/analogy/cmd_write.c
@@ -308,7 +308,7 @@ int main(int argc, char *argv[])
                                (scan_size * cmd.stop_arg - cnt) > BUF_SIZE ? 
                                BUF_SIZE : (scan_size * cmd.stop_arg - cnt);
 
-                       ret = a4l_sys_write(dsc.fd, buf, tmp);
+                       ret = a4l_async_write(&dsc, buf, tmp, A4L_INFINITE);
                        if (ret < 0) {
                                fprintf(stderr,
                                        "cmd_write: a4l_write failed 
(ret=%d)\n",


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to