+ struct task_struct *task;
+};
+#endif
+diff -Nurb linux-2.6.22-580/include/linux/mutex.h linux-2.6.22-590/include/linux/mutex.h
+--- linux-2.6.22-580/include/linux/mutex.h 2008-04-30 09:19:15.000000000 -0400
++++ linux-2.6.22-590/include/linux/mutex.h 2008-04-29 17:09:49.000000000 -0400
+@@ -53,6 +53,10 @@
+ struct thread_info *owner;
+ const char *name;
+ void *magic;
++#else
++#ifdef CONFIG_CHOPSTIX
++ struct thread_info *owner;
++#endif
+ #endif
+
+ #ifdef CONFIG_DEBUG_LOCK_ALLOC
diff -Nurb linux-2.6.22-580/include/linux/sched.h linux-2.6.22-590/include/linux/sched.h
--- linux-2.6.22-580/include/linux/sched.h 2008-04-29 17:04:54.000000000 -0400
+++ linux-2.6.22-590/include/linux/sched.h 2008-04-29 17:05:11.000000000 -0400
diff -Nurb linux-2.6.22-580/kernel/sched.c linux-2.6.22-590/kernel/sched.c
--- linux-2.6.22-580/kernel/sched.c 2008-04-29 17:04:54.000000000 -0400
-+++ linux-2.6.22-590/kernel/sched.c 2008-04-29 17:05:11.000000000 -0400
++++ linux-2.6.22-590/kernel/sched.c 2008-04-30 09:14:33.000000000 -0400
@@ -10,7 +10,7 @@
* 1998-11-19 Implemented schedule_timeout() and related stuff
* by Andrea Arcangeli
}
}
-@@ -3765,6 +3793,38 @@
+@@ -3765,6 +3793,39 @@
prev->sleep_avg = 0;
prev->timestamp = prev->last_ran = now;
+ if (rec_event) {
+ prev->last_ran_j = jiffies;
+ if (next->last_interrupted!=-1) {
++ if (next->last_interrupted) {
++ diff = (jiffies-next->last_interrupted);
++ sampling_reason = 0;
++ }
++ else {
++ diff = jiffies-next->last_ran_j;
++ sampling_reason = 1;
++ }
++
+ if (diff > HZ/5) {
+ struct event event;
+ struct event_spec espec;
+ unsigned long eip;
+
-+ if (next->last_interrupted) {
-+ diff = (jiffies-next->last_interrupted);
-+ sampling_reason = 0;
-+ }
-+ else {
-+ diff = jiffies-next->last_ran_j;
-+ sampling_reason = 1;
-+ }
+ espec.reason = sampling_reason;
+ eip = next->thread.esp & 4095;
+ event.event_data=&espec;
sched_info_switch(prev, next);
if (likely(prev != next)) {
next->timestamp = next->last_ran = now;
-@@ -4664,6 +4724,7 @@
+@@ -4664,6 +4725,7 @@
get_task_struct(p);
read_unlock(&tasklist_lock);
retval = -EPERM;
if ((current->euid != p->euid) && (current->euid != p->uid) &&
!capable(CAP_SYS_NICE))
-@@ -5032,6 +5093,7 @@
+@@ -5032,6 +5094,7 @@
jiffies_to_timespec(p->policy == SCHED_FIFO ?
0 : task_timeslice(p), &t);
read_unlock(&tasklist_lock);
retval = copy_to_user(interval, &t, sizeof(t)) ? -EFAULT : 0;
out_nounlock:
return retval;
-@@ -7275,3 +7337,9 @@
+@@ -7275,3 +7338,9 @@
}
#endif