Enable irqs around the while loop waiting on magic memory
authorKevin Klues <klueska@parcad.millennium.berkeley.edu>
Fri, 23 Apr 2010 23:46:41 +0000 (16:46 -0700)
committerKevin Klues <klueska@cs.berkeley.edu>
Thu, 3 Nov 2011 00:35:44 +0000 (17:35 -0700)
This is necessary if we happen to make frontend system calls on
cores that take interrupts (i.e. the NIC filling in that magic memory).

kern/src/frontend.c

index 693394d..6821806 100644 (file)
@@ -261,11 +261,11 @@ int32_t frontend_syscall(pid_t pid, int32_t syscall_num,
        magic_mem[0] = 0x80;
 
        // wait for front-end response
-       //int8_t irqsave = 0;
-       //enable_irqsave(&irqsave);
+       int8_t irqsave = 0;
+       enable_irqsave(&irqsave);
        while(magic_mem[7] == 0)
                ;
-       //disable_irqsave(&irqsave);
+       disable_irqsave(&irqsave);
 
        ret = magic_mem[1];
        if(errno)