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

Author: Alexis Berlemont <alexis.berlem...@gmail.com>
Date:   Thu Jun 10 22:42:40 2010 +0200

analogy: fix buffer's compilation issues (broken)

---

 include/analogy/buffer.h |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/include/analogy/buffer.h b/include/analogy/buffer.h
index 4846a4e..4bd5db0 100644
--- a/include/analogy/buffer.h
+++ b/include/analogy/buffer.h
@@ -32,6 +32,7 @@
 
 #include <rtdm/rtdm_driver.h>
 
+#include <analogy/os_facilities.h>
 #include <analogy/context.h>
 
 /* Events bits */
@@ -179,11 +180,11 @@ static inline int __handle_event(a4l_buf_t * buf)
 
        /* The event "End of acquisition" must not be cleaned
           before the complete flush of the buffer */
-       if (test_bit(A4L_BUF_EOA_NR, &buf->evt_flags)) {
+       if (test_bit(A4L_BUF_EOA_NR, &buf->flags)) {
                ret = -ENOENT;
        }
 
-       if (test_bit(A4L_BUF_ERROR_NR, &buf->evt_flags)) {
+       if (test_bit(A4L_BUF_ERROR_NR, &buf->flags)) {
                ret = -EPIPE;
        }
 
@@ -195,7 +196,7 @@ static inline int __handle_event(a4l_buf_t * buf)
 static inline int __pre_abs_put(a4l_buf_t * buf, unsigned long count)
 {
        if (count - buf->tmp_count > buf->size) {
-               set_bit(A4L_BUF_ERROR_NR, &buf->evt_flags);
+               set_bit(A4L_BUF_ERROR_NR, &buf->flags);
                return -EPIPE;
        }
 
@@ -235,7 +236,7 @@ static inline int __pre_abs_get(a4l_buf_t * buf, unsigned 
long count)
        was not greater a few cycles before; in such case, the DMA
        channel would have retrieved the wrong data */
        if ((long)(count - buf->tmp_count) > 0) {
-               set_bit(A4L_BUF_ERROR_NR, &buf->evt_flags);
+               set_bit(A4L_BUF_ERROR_NR, &buf->flags);
                return -EPIPE;
        }
 
@@ -260,10 +261,10 @@ static inline int __abs_put(a4l_buf_t * buf, unsigned 
long count)
        buf->prd_count = count;
 
        if ((old / buf->size) != (count / buf->size))
-               set_bit(A4L_BUF_EOBUF_NR, &buf->evt_flags);
+               set_bit(A4L_BUF_EOBUF_NR, &buf->flags);
 
        if (buf->end_count != 0 && (long)(count - buf->end_count) >= 0)
-               set_bit(A4L_BUF_EOA_NR, &buf->evt_flags);
+               set_bit(A4L_BUF_EOA_NR, &buf->flags);
 
        return 0;
 }
@@ -283,10 +284,10 @@ static inline int __abs_get(a4l_buf_t * buf, unsigned 
long count)
        buf->cns_count = count;
 
        if ((old / buf->size) != count / buf->size)
-               set_bit(A4L_BUF_EOBUF_NR, &buf->evt_flags);
+               set_bit(A4L_BUF_EOBUF_NR, &buf->flags);
 
        if (buf->end_count != 0 && (long)(count - buf->end_count) >= 0)
-               set_bit(A4L_BUF_EOA_NR, &buf->evt_flags);
+               set_bit(A4L_BUF_EOA_NR, &buf->flags);
 
        return 0;
 }
@@ -329,6 +330,10 @@ static inline unsigned long __count_to_get(a4l_buf_t * buf)
 
 /* --- Buffer internal functions --- */
 
+int a4l_alloc_buffer(a4l_buf_t *buf_desc, int buf_size);
+
+void a4l_free_buffer(a4l_buf_t *buf_desc);
+
 void a4l_init_buffer(a4l_buf_t * buf_desc);
 
 int a4l_setup_buffer(a4l_cxt_t *cxt, a4l_cmd_t *cmd);


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

Reply via email to