Module: xenomai-abe
Branch: analogy
Commit: 379d6ce235cbb9b93d931e9bc6da23882814cbd2
URL:    
http://git.xenomai.org/?p=xenomai-abe.git;a=commit;h=379d6ce235cbb9b93d931e9bc6da23882814cbd2

Author: Alexis Berlemont <alexis.berlem...@gmail.com>
Date:   Sun May 16 23:11:47 2010 +0200

analogy: change the context's role (broken)

---

 include/analogy/context.h |   27 +++++++++------------------
 1 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/include/analogy/context.h b/include/analogy/context.h
index 7bd225a..d30bbba 100644
--- a/include/analogy/context.h
+++ b/include/analogy/context.h
@@ -25,29 +25,20 @@
 
 #if defined(__KERNEL__) && !defined(DOXYGEN_CPP)
 
-#include <analogy/os_facilities.h>
-
 struct a4l_device;
+struct a4l_buffer;
 
-struct a4l_context {
-
-       /* This field is redundant with the following parameters;
-          setting it at the head of the structure may save 
-          useless operations */
-       struct a4l_device *dev;
+struct a4l_device_context {
+       /* No need to hold user_info, thanks to container_of, we could
+          get it back */
        rtdm_user_info_t *user_info;
-       struct rtdm_dev_context *rtdm_cxt;
-};
-typedef struct a4l_context a4l_cxt_t;
 
-#define a4l_get_minor(x) ((x)->rtdm_cxt->device->device_id)
+       struct a4l_device *dev; /* Which is retrieved thanks to minor
+                                  at open time */
 
-#define a4l_init_cxt(c, u, x)                  \
-    {                                                  \
-       (x)->rtdm_cxt = c;                              \
-       (x)->user_info = u;                             \
-       (x)->dev = NULL;                                \
-    }
+       struct buffer buffer; /* The buffer field is extracted from
+                                the transfer structure */
+};
 
 #endif /* __KERNEL__ && !DOXYGEN_CPP */
 


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

Reply via email to