Matthew Dillon wrote: > > This looks quite nice. I just realized though that it isn't safe > to run reboot() (or probably ksignal either) from the idle halt > code, so scratch that part.
thanks. ok. > > We have to find a good place to put this. I think what we may have > to do is create a kernel thread whos only job is to shut the kernel > down, and then check the mailbox from inside signalmailbox() and have > it wake the special kernel thread up. > > Would you like to have a go at that or would you like me to do it? If the special thread doesn't need to do any other cleanup that I'm likely unaware of, I can give it another shot this weekend. Not yet knowing the overall code paths unfortunately means I'm kind of coding this blind .. but I suppose the point is to learn as I go. I assume the reason for the thread is that the way things are currently called, the VK might not be in a consistent internal state when the signal is delivered to init and/or init is rescheduled to run? to clarify: - keep signal handler and shutdown function in the exception setup - create kthread somewhere ( main() ? platform init? ) - remove checks from both idle loop / task switching areas - add check / wakeup logic to signalmailbox() Thanks, - Chris
