aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/smp.h
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-05-09 17:50:11 +0000
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-05-09 17:50:11 +0000
commit24edf4b8989a60f108982ee44590df856a8fc9b2 (patch)
treea89eadc9e53a8000808cd3b56183a860fb7c51d4 /xen/include/xen/smp.h
parent09e259436510fe39c0e55a4195f5368a1a386dba (diff)
downloadxen-24edf4b8989a60f108982ee44590df856a8fc9b2.tar.gz
xen-24edf4b8989a60f108982ee44590df856a8fc9b2.tar.bz2
xen-24edf4b8989a60f108982ee44590df856a8fc9b2.zip
bitkeeper revision 1.1389.10.1 (427fa2d3ZV92f_ErvLuIzWbV1f67QA)
Phase 1 of upgrading platform code to be derived from Linux 2.6.11 rather than 2.4.x. Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/include/xen/smp.h')
-rw-r--r--xen/include/xen/smp.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/xen/include/xen/smp.h b/xen/include/xen/smp.h
index df80e23295..811e25ac24 100644
--- a/xen/include/xen/smp.h
+++ b/xen/include/xen/smp.h
@@ -47,6 +47,17 @@ extern int smp_call_function(
void (*func) (void *info), void *info, int retry, int wait);
/*
+ * Call a function on all processors
+ */
+static inline int on_each_cpu(void (*func) (void *info), void *info,
+ int retry, int wait)
+{
+ int ret = smp_call_function(func, info, retry, wait);
+ func(info);
+ return ret;
+}
+
+/*
* True once the per process idle is forked
*/
extern int smp_threads_ready;
@@ -85,7 +96,15 @@ extern volatile int smp_msg_id;
#define cpu_logical_map(cpu) 0
#define cpu_number_map(cpu) 0
#define smp_call_function(func,info,retry,wait) 0
+#define on_each_cpu(func,info,retry,wait) ({ func(info); 0; })
#define cpu_online_map 1
#endif
+
+#ifdef __smp_processor_id
+#define smp_processor_id() __smp_processor_id()
+#else
+extern unsigned int smp_processor_id(void);
+#endif
+
#endif