Skip to contentSkip to conversation

Subject :[ PATCH 003:003] inclue files

PATCH raz ben yehuda 1 participant 1 message Aug 22, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

offsched APIs to be used by offsched drivers.

 cpu.h   |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 sched.h |    2 +-
 2 files changed, 51 insertions(+), 1 deletion(-)
Signed-off-by [email protected]

---

include/linux/cpu.h renamed from linux-2.6.30/include/linux/cpu.h +50 -0
diff -X 2.6.30-offsched/Documentation/dontdiff -urN tmp/linux-2.6.30/include/linux/cpu.h 2.6.30-offsched/include/linux/cpu.h
@@ -43,14 +43,28 @@
 
 #ifdef CONFIG_HOTPLUG_CPU
 extern void unregister_cpu(struct cpu *cpu);
+extern void unregister_offsched(int cpuid);
 #endif
 struct notifier_block;
 
 #ifdef CONFIG_SMP
 /* Need to know about CPUs going up/down? */
 #ifdef CONFIG_HOTPLUG_CPU
+
+
 extern int register_cpu_notifier(struct notifier_block *nb);
 extern void unregister_cpu_notifier(struct notifier_block *nb);
+extern int register_offsched(void (*hotplug_cpu_dead)(void), int cpuid);
+extern int is_offsched(int cpuid);
+extern int is_offsched_kmem(int cpuid);
+extern void unset_offsched_kmem(int cpuid);
+extern void set_offsched_kmem(int cpuid);
+extern void run_offsched(void);
+extern int  offsched_is_napi_avail(void);
+extern void offsched_register_napi(void);
+extern void offsched_unregister_napi(void);
+extern void offsched_napi_schedule(void *n);
+extern int offsched_pkt(void *s);
 #else
 
 #ifndef MODULE
@@ -60,11 +74,47 @@
 {
 	return 0;
 }
+
+static inline int register_offsched(void (*hotplug_cpu_dead)(void), int cpuid);
+{
+	return 0;
+}
+
+int  offsched_is_napi_avail(void)
+{
+	return 0;
+}
+
+int offsched_pkt(void *s)
+{
+	return 0;
+}
 #endif
 
 static inline void unregister_cpu_notifier(struct notifier_block *nb)
 {
 }
+
+static inline void unregister_offsched(int cpuid)
+{
+}
+static inline int is_offsched(int cpuid)
+{
+	return 0;
+}
+static inline void run_offsched(void)
+{
+}
+static inline int is_offsched_memory(int cpuid)
+{
+	return 0;
+}
+
+static inline void offsched_napi_schedule(void *n)
+{
+
+}
+
 #endif
 
 int cpu_up(unsigned int cpu);
include/linux/sched.h renamed from linux-2.6.30/include/linux/sched.h +1 -1
diff -X 2.6.30-offsched/Documentation/dontdiff -urN tmp/linux-2.6.30/include/linux/sched.h 2.6.30-offsched/include/linux/sched.h
@@ -1999,7 +1999,7 @@
 
 extern void set_task_comm(struct task_struct *tsk, char *from);
 extern char *get_task_comm(char *to, struct task_struct *tsk);
-
+extern rwlock_t *get_tasklist_lock(void);
 #ifdef CONFIG_SMP
 extern unsigned long wait_task_inactive(struct task_struct *, long match_state);
 #else