Merge branch 'master' into proc-work
[akaros.git] / kern / include / smp.h
index 975693b..d8c1fb0 100644 (file)
@@ -1,3 +1,9 @@
+/*
+ * Copyright (c) 2009 The Regents of the University of California
+ * Barret Rhoden <brho@cs.berkeley.edu>
+ * See LICENSE for details.
+ */
+
 #ifndef ROS_INC_SMP_H
 #define ROS_INC_SMP_H
 
 #include <atomic.h>
 #include <workqueue.h>
 
-#ifdef __BOCHS__
-#define SMP_CALL_FUNCTION_TIMEOUT    0x00ffffff
-#define SMP_BOOT_TIMEOUT             0x0000ffff
-#else
-#define SMP_CALL_FUNCTION_TIMEOUT    0x7ffffff0
-#define SMP_BOOT_TIMEOUT             0x002fffff
-#endif
-
-typedef struct per_cpu_info {
+// will want this padded out to cacheline alignment
+struct per_cpu_info {
        uint32_t lock;
-       // Once we have a real kmalloc, we can make this dynamic.  Want a queue.
-       work_t delayed_work;
-       // will want it padded out to an even cacheline
-} per_cpu_info_t;
-
-extern per_cpu_info_t per_cpu_info[MAX_NUM_CPUS];
+       struct workqueue workqueue;
+};
+extern struct per_cpu_info  per_cpu_info[MAX_NUM_CPUS];
 extern volatile uint8_t num_cpus;
 
 /* SMP bootup functions */