Kernel messages infrastructure
[akaros.git] / kern / include / smp.h
index 1114feb..a0f2b35 100644 (file)
@@ -16,7 +16,6 @@
 #include <atomic.h>
 #include <process.h>
 #include <workqueue.h>
-#include <env.h>
 
 #ifdef __SHARC__
 typedef sharC_env_t;
@@ -24,6 +23,8 @@ typedef sharC_env_t;
 
 struct per_cpu_info {
        spinlock_t lock;
+       struct proc *cur_proc;
+       trapframe_t *cur_tf;
        bool preempt_pending;
        struct workqueue NTPTV(t) workqueue;
 
@@ -33,15 +34,20 @@ struct per_cpu_info {
        // zra: Used by Ivy. Let me know if this should go elsewhere.
        sharC_env_t sharC_env;
 #endif
+#ifdef __i386__
+       segdesc_t *gdt;
+#endif
 
-       spinlock_t amsg_lock;
-       struct active_msg_list NTPTV(a0t) NTPTV(a1t) NTPTV(a2t) active_msgs;
+       spinlock_t immed_amsg_lock;
+       struct kernel_msg_list NTPTV(a0t) NTPTV(a1t) NTPTV(a2t) immed_amsgs;
+       spinlock_t routine_amsg_lock;
+       struct kernel_msg_list NTPTV(a0t) NTPTV(a1t) NTPTV(a2t) routine_amsgs;
 }__attribute__((aligned(HW_CACHE_ALIGN)));
 
 typedef struct per_cpu_info NTPTV(t) NTPTV(a0t) NTPTV(a1t) NTPTV(a2t) per_cpu_info_t;
 
 extern per_cpu_info_t (RO per_cpu_info)[MAX_NUM_CPUS];
-extern volatile uint8_t RO num_cpus;
+extern volatile uint32_t RO num_cpus;
 
 /* SMP bootup functions */
 void smp_boot(void);