Whamcloud - gitweb
libcfs: add cfs_{need,cond}_resched() definition and implementations for
authornikita <nikita>
Sat, 18 Oct 2008 17:43:11 +0000 (17:43 +0000)
committernikita <nikita>
Sat, 18 Oct 2008 17:43:11 +0000 (17:43 +0000)
Linux, NT, and liblustre.
b=16450

libcfs/include/libcfs/libcfs_prim.h
libcfs/libcfs/linux/linux-prim.c
libcfs/libcfs/user-prim.c
libcfs/libcfs/winnt/winnt-prim.c
lustre/ChangeLog

index 64938a5..8dca0a9 100644 (file)
@@ -48,6 +48,8 @@
 void cfs_schedule_timeout(cfs_task_state_t state, int64_t timeout);
 void cfs_schedule(void);
 void cfs_pause(cfs_duration_t ticks);
+int  cfs_need_resched(void);
+void cfs_cond_resched(void);
 
 /*
  * Wait Queues
index f8cdf81..9019b3f 100644 (file)
@@ -153,6 +153,18 @@ cfs_pause(cfs_duration_t ticks)
 }
 EXPORT_SYMBOL(cfs_pause);
 
+int cfs_need_resched(void)
+{
+        return need_resched();
+}
+EXPORT_SYMBOL(cfs_need_resched);
+
+void cfs_cond_resched(void)
+{
+        cond_resched();
+}
+EXPORT_SYMBOL(cfs_cond_resched);
+
 void cfs_init_timer(cfs_timer_t *t)
 {
         init_timer(t);
index ee381d6..bf57b4c 100644 (file)
@@ -143,6 +143,15 @@ cfs_pause(cfs_duration_t d)
         nanosleep(&s, NULL);
 }
 
+int cfs_need_resched(void)
+{
+        return 0;
+}
+
+void cfs_cond_resched(void)
+{
+}
+
 /*
  * Timer
  */
index e62a39e..e271e18 100644 (file)
@@ -741,6 +741,15 @@ errorout:
     return NT_SUCCESS(status);
 }
 
+int cfs_need_resched(void)
+{
+        return 0;
+}
+
+void cfs_cond_resched(void)
+{
+}
+
 /**
  **  Initialize routines 
  **/
index 66e874b..6d3b6d6 100644 (file)
@@ -1718,6 +1718,12 @@ Bugzilla   : 16450
 Description: Liblustre build fixes.
 Details    : Liblustre build fixes.
 
+Severity   : normal
+Bugzilla   : 16450
+Description: libcfs: add cfs_{need,cond}_resched() interface.
+Details    : libcfs: add cfs_{need,cond}_resched() definition and
+            implementations for Linux, NT, and liblustre.
+
 --------------------------------------------------------------------------------
 
 2007-08-10         Cluster File Systems, Inc. <info@clusterfs.com>