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

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Mon Apr  5 17:25:29 2010 +0200

Fix historic msleep wrapping

Probably only an academic exercise: Fix the rounding bug in msleep
wrapper for kernels < 2.4.28.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 include/asm-generic/wrappers.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-generic/wrappers.h b/include/asm-generic/wrappers.h
index 15d9837..64ec43f 100644
--- a/include/asm-generic/wrappers.h
+++ b/include/asm-generic/wrappers.h
@@ -197,7 +197,7 @@ do {                                                        
                \
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,28)
 #define msleep(x) do {                          \
        set_current_state(TASK_UNINTERRUPTIBLE); \
-       schedule_timeout((x)*(HZ/1000));         \
+       schedule_timeout(((x)*HZ)/1000);         \
 } while(0)
 #endif
 


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

Reply via email to