changeset 3258:e86882a128b7

* include/linux/kernel.h (jiffies): Use cyg_current_time(), not a constant. JFFS2 at least uses it to occasionally vary behaviour. Fixes bug #1001591.
author jlarmour
date Sun, 27 May 2012 00:51:28 +0000
parents 9b3d0f81044b
children e206e402896a
files packages/compat/linux/current/ChangeLog packages/compat/linux/current/include/linux/kernel.h
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/packages/compat/linux/current/ChangeLog
+++ b/packages/compat/linux/current/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-27  Jonathan Larmour  <jifl@eCosCentric.com>
+
+	* include/linux/kernel.h (jiffies): Use cyg_current_time(), not
+	a constant. JFFS2 at least uses it to occasionally vary behaviour.
+	Fixes bug #1001591.
+
 2005-09-21  Steven_cheng <05071@alphanetworks.com>
 
 	* include/linux/types.h: Added unsigned types.
--- a/packages/compat/linux/current/include/linux/kernel.h
+++ b/packages/compat/linux/current/include/linux/kernel.h
@@ -1,8 +1,10 @@
 #ifndef __LINUX_KERNEL_H__
 #define __LINUX_KERNEL_H__
-#include <cyg/infra/diag.h>
+#include <cyg/infra/diag.h>       // For diag_printf
+#include <cyg/fileio/fileio.h>    // For cyg_timestamp
+#include <cyg/kernel/kapi.h>      // For cyg_current_time
 
-#define jiffies 100
+#define jiffies ((unsigned long)cyg_current_time())
 
 #define ERR_PTR(err) ((void*)(err))
 #define PTR_ERR(err) ((unsigned long)(err))