Add support for attempting returns from panic
[akaros.git] / kern / src / trap.c
index 4a6f494..5e3824d 100644 (file)
@@ -59,6 +59,7 @@ int reflect_current_context(void)
        uint32_t vcoreid = pcpui->owning_vcoreid;
        struct preempt_data *vcpd = &p->procdata->vcore_preempt_data[vcoreid];
 
+       assert(pcpui->cur_proc == pcpui->owning_proc);
        if (!proc_is_vcctx_ready(p))
                return -1;
        if (vcpd->notif_disabled)
@@ -110,7 +111,8 @@ struct kmem_cache *kernel_msg_cache;
 void kernel_msg_init(void)
 {
        kernel_msg_cache = kmem_cache_create("kernel_msgs",
-                          sizeof(struct kernel_message), ARCH_CL_SIZE, 0, 0, 0);
+                                            sizeof(struct kernel_message),
+                                            ARCH_CL_SIZE, 0, NULL, 0, 0, NULL);
 }
 
 uint32_t send_kernel_message(uint32_t dst, amr_t pc, long arg0, long arg1,