summaryrefslogtreecommitdiffstats
path: root/runtime/runtime.h
diff options
context:
space:
mode:
authorWenji Huang <wenji.huang@oracle.com>2008-11-17 00:06:59 -0500
committerWenji Huang <wenji.huang@oracle.com>2008-11-17 00:06:59 -0500
commita6ce170764b0ec75d3ddbca20823b2a951a225d2 (patch)
tree8e1534f74dfb3cd53305a71c4ec07f1fd71da706 /runtime/runtime.h
parentb3e8f644958f5033beebeb91edf11d5edf21c8c1 (diff)
downloadsystemtap-steved-a6ce170764b0ec75d3ddbca20823b2a951a225d2.tar.gz
systemtap-steved-a6ce170764b0ec75d3ddbca20823b2a951a225d2.tar.xz
systemtap-steved-a6ce170764b0ec75d3ddbca20823b2a951a225d2.zip
Fix the conflicted for_each_cpu macro with 2.6.28.
Diffstat (limited to 'runtime/runtime.h')
-rw-r--r--runtime/runtime.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/runtime/runtime.h b/runtime/runtime.h
index cd3d0b11..7507e594 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -39,8 +39,14 @@
#define STP_OLD_TRANSPORT
#endif
-#ifndef for_each_cpu
-#define for_each_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
+#ifndef stp_for_each_cpu
+#define stp_for_each_cpu(cpu) for_each_cpu((cpu), cpu_possible_map)
+#endif
+#else
+#ifndef stp_for_each_cpu
+#define stp_for_each_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map)
+#endif
#endif
static void _stp_dbug (const char *func, int line, const char *fmt, ...);