summaryrefslogtreecommitdiffstats
path: root/runtime/alloc.c
diff options
context:
space:
mode:
authorhunt <hunt>2006-01-25 10:08:47 +0000
committerhunt <hunt>2006-01-25 10:08:47 +0000
commite248d93f6ba4f1529356993d55e42d6f7c08f066 (patch)
tree92aaeeb70676b2ddd046e9ee587082d0413a9b7f /runtime/alloc.c
parent88dd1f5cf8fbe00d76b6cf56170fcc05de970130 (diff)
downloadsystemtap-steved-e248d93f6ba4f1529356993d55e42d6f7c08f066.tar.gz
systemtap-steved-e248d93f6ba4f1529356993d55e42d6f7c08f066.tar.xz
systemtap-steved-e248d93f6ba4f1529356993d55e42d6f7c08f066.zip
Cleanup
Diffstat (limited to 'runtime/alloc.c')
-rw-r--r--runtime/alloc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/alloc.c b/runtime/alloc.c
index a09a515d..ad291f2d 100644
--- a/runtime/alloc.c
+++ b/runtime/alloc.c
@@ -18,6 +18,12 @@
#define kmalloc_node(size,flags,node) kmalloc(size,flags)
#endif /* LINUX_VERSION_CODE */
+#ifdef CONFIG_SMP
+#define _stp_free_percpu(ptr) free_percpu(ptr)
+#else
+#define _stp_free_percpu(ptr) kfree(ptr)
+#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
#define _stp_alloc_percpu(size) __alloc_percpu(size, 8)
#else
@@ -74,8 +80,6 @@ void *_stp_alloc_percpu(size_t size)
memset(ret, 0, size);
return ret;
}
-#define _stp_free_percpu(ptr) kfree(ptr)
-
#endif /* CONFIG_SMP */
#endif /* LINUX_VERSION_CODE */
#endif /* _ALLOC_C_ */