Return bool from reset_alarm_* apis.
[akaros.git] / kern / src / frontend.c
index a74a4bf..75f85c9 100644 (file)
@@ -21,7 +21,7 @@ volatile int magic_mem[10];
 void
 frontend_proc_init(struct proc *SAFE p)
 {
-#ifdef __CONFIG_APPSERVER__
+#ifdef CONFIG_APPSERVER
        pid_t parent_id = p->ppid, id = p->pid;
        int32_t errno;
        if(frontend_syscall(parent_id,APPSERVER_SYSCALL_proc_init,id,0,0,0,&errno))
@@ -32,7 +32,7 @@ frontend_proc_init(struct proc *SAFE p)
 void
 frontend_proc_free(struct proc *SAFE p)
 {
-#ifdef __CONFIG_APPSERVER__
+#ifdef CONFIG_APPSERVER
        int32_t errno;
        if(frontend_syscall(0,APPSERVER_SYSCALL_proc_free,p->pid,0,0,0,&errno))
                panic("Front-end server couldn't free process!");
@@ -144,7 +144,7 @@ int32_t frontend_syscall(pid_t pid, int32_t syscall_num,
                          uint32_t arg0, uint32_t arg1, 
                          uint32_t arg2, uint32_t arg3, int32_t* errno)
 {
-#ifndef __CONFIG_APPSERVER__
+#ifndef CONFIG_APPSERVER
        warn("No appserver support, requested syscall %d for proc %d", syscall_num,
             pid);
        if(errno)
@@ -152,7 +152,7 @@ int32_t frontend_syscall(pid_t pid, int32_t syscall_num,
        return -1;
 #endif
 
-#ifdef __i386__
+#ifdef CONFIG_X86
        if (!irq_is_enabled())
                warn("IRQ is disabled in frontend_syscall %d for proc %d\n", syscall_num, pid);
 #endif
@@ -188,7 +188,7 @@ int32_t frontend_syscall(pid_t pid, int32_t syscall_num,
        return ret;
 }
 
-void __diediedie(trapframe_t* tf, uint32_t srcid, uint32_t code, uint32_t a1, uint32_t a2)
+void __diediedie(uint32_t srcid, uint32_t code, uint32_t a1, uint32_t a2)
 {
        int32_t errno;
        frontend_syscall(0,APPSERVER_SYSCALL_exit,(int)code,0,0,0,&errno);
@@ -200,9 +200,9 @@ void appserver_die(uintptr_t code)
        int i;
        for(i = 0; i < num_cpus; i++)
                if(i != core_id())
-                       while(send_kernel_message(i,(amr_t)&__diediedie,(void*)code,0,0,
+                       while(send_kernel_message(i, (amr_t)&__diediedie, code, 0, 0,
                                                  KMSG_IMMEDIATE));
 
        // just in case.
-       __diediedie(0,0,code,0,0);
+       __diediedie(0, code, 0, 0);
 }