patch-1.3.31 linux/include/linux/smp.h

Next file: linux/include/linux/tasks.h
Previous file: linux/include/linux/sched.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.30/linux/include/linux/smp.h linux/include/linux/smp.h
@@ -6,6 +6,7 @@
  *		Alan Cox. <alan@cymru.net>
  */
 
+#ifdef CONFIG_SMP
 #include <asm/smp.h>
 
  
@@ -28,4 +29,15 @@
 #define MSG_STOP_CPU		0x0002		/* Sent to shut down slave CPU's when rebooting */
 #define MSG_RESCHEDULE		0x0003		/* Reschedule request from master CPU */
 
+#else
+
+/*
+ *	These macros fold the SMP functionality into a single CPU system
+ */
+ 
+#define smp_num_cpus			1
+#define smp_processor_id()		0
+#define smp_message_pass(t,m,d,w)	
+#define smp_threads_ready		1
+#endif
 #endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this