From: Patrick M. <mo...@os...> - 2002-09-07 19:45:54
|
On Fri, 6 Sep 2002, Grover, Andrew wrote: > > From: Patrick Mochel [mailto:mo...@os...] > > [1] Once upon a time (last May), I implemented a patch that > > overloaded the > > reboot(2) system call to initiate suspend transitions in a > > platform-specific manner (as per Linus's suggestion). This is in the > > resurrection queue and will probably resurface soon. > > Hmm. > > Maybe it would be cleaner to give sleep its own system call. > > Having reboot(2) overloaded with suspend functionality is a little > non-intuitive. Just a thought. That's what I did initially, but I was encouraged instead to overload reboot. And, it does make quite a bit of sense considering the following: - syscall numbers are few and very difficult to get. We'd be taking one that only makes sense on a subset of the x86 platforms out there and on a subset of the total architectures (though this subset accounts for probably 95% of the install base). - reboot(2) is a power transition. suspend(2) is a power transition. Conceptuallly, they're similar. They are functionally, too. - swsusp already has a hook in it. -pat |