Module: xenomai-3
Branch: next
Commit: 7ae93fc219c2a68317b5e21f7323820ddb20fa34
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=7ae93fc219c2a68317b5e21f7323820ddb20fa34

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Oct 22 10:10:04 2014 +0200

cobalt/autotune: fixup for 32bit emulation

---

 include/rtdm/uapi/autotune.h       |    8 ++++----
 kernel/drivers/autotune/autotune.c |    4 ++--
 utils/autotune/autotune.c          |    8 ++++----
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/rtdm/uapi/autotune.h b/include/rtdm/uapi/autotune.h
index 4a75d72..225f2f8 100644
--- a/include/rtdm/uapi/autotune.h
+++ b/include/rtdm/uapi/autotune.h
@@ -24,15 +24,15 @@
 #define RTDM_SUBCLASS_AUTOTUNE         0
 
 struct autotune_setup {
-       int period;
-       int quiet;
+       __u32 period;
+       __u32 quiet;
 };
 
 #define AUTOTUNE_RTIOC_IRQ             _IOW(RTDM_CLASS_AUTOTUNE, 0, struct 
autotune_setup)
 #define AUTOTUNE_RTIOC_KERN            _IOW(RTDM_CLASS_AUTOTUNE, 1, struct 
autotune_setup)
 #define AUTOTUNE_RTIOC_USER            _IOW(RTDM_CLASS_AUTOTUNE, 2, struct 
autotune_setup)
-#define AUTOTUNE_RTIOC_PULSE           _IOW(RTDM_CLASS_AUTOTUNE, 3, 
nanosecs_abs_t)
-#define AUTOTUNE_RTIOC_RUN             _IOR(RTDM_CLASS_AUTOTUNE, 4, unsigned 
long)
+#define AUTOTUNE_RTIOC_PULSE           _IOW(RTDM_CLASS_AUTOTUNE, 3, __u64)
+#define AUTOTUNE_RTIOC_RUN             _IOR(RTDM_CLASS_AUTOTUNE, 4, __u32)
 #define AUTOTUNE_RTIOC_RESET           _IO(RTDM_CLASS_AUTOTUNE, 5)
 
 #endif /* !_RTDM_UAPI_AUTOTUNE_H */
diff --git a/kernel/drivers/autotune/autotune.c 
b/kernel/drivers/autotune/autotune.c
index 34ba9d5..79608b3 100644
--- a/kernel/drivers/autotune/autotune.c
+++ b/kernel/drivers/autotune/autotune.c
@@ -675,8 +675,8 @@ static int autotune_ioctl_rt(struct rtdm_fd *fd, unsigned 
int request, void *arg
 {
        struct autotune_context *context;
        struct gravity_tuner *tuner;
-       nanosecs_abs_t timestamp;
-       unsigned int gravity;
+       __u64 timestamp;
+       __u32 gravity;
        int ret;
 
        context = rtdm_fd_to_private(fd);
diff --git a/utils/autotune/autotune.c b/utils/autotune/autotune.c
index 5a18310..fe2f621 100644
--- a/utils/autotune/autotune.c
+++ b/utils/autotune/autotune.c
@@ -87,8 +87,8 @@ static const struct option base_options[] = {
 
 static void *sampler_thread(void *arg)
 {
-       nanosecs_abs_t timestamp = 0;
        int fd = (long)arg, ret, n = 0;
+       __u64 timestamp = 0;
        struct timespec now;
 
        for (;;) {
@@ -101,7 +101,7 @@ static void *sampler_thread(void *arg)
                } else {
                        n++;
                        clock_gettime(CLOCK_MONOTONIC, &now);
-                       timestamp = (nanosecs_abs_t)now.tv_sec * 1000000000 + 
now.tv_nsec;
+                       timestamp = (__u64)now.tv_sec * 1000000000 + 
now.tv_nsec;
                }
        }
 
@@ -206,8 +206,8 @@ static void usage(void)
 static void run_tuner(int fd, int op, int period, const char *type)
 {
        struct autotune_setup setup;
-       unsigned long gravity;
        pthread_t sampler;
+       __u32 gravity;
        int ret;
 
        setup.period = period;
@@ -232,7 +232,7 @@ static void run_tuner(int fd, int op, int period, const 
char *type)
                pthread_cancel(sampler);
 
        if (!quiet)
-               printf("%lu ns\n", gravity);
+               printf("%u ns\n", gravity);
 }
 
 int main(int argc, char *const argv[])


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to