This file describes the API between suspend_userui kernel module and
userui_core.

userui communicates with the kernel over a netlink socket. The sequence of events
when suspending with userui activated goes something like:

1. suspend_userui creates a netlink socket over which processes can communicate
with it.

2. suspend_userui forks off the userui process (pointed to by
/proc/software_suspend/userui_program) and waits until it sends a USERUI_MSG_READY
message or a timeout expires (10 seconds).

3. userui runs, and sends a USERUI_MSG_NOFREEZE_ME packet.

4. suspend_userui sets the PF_NOFREEZE flag on the userui process, so that this
may be inherited by any children it spawns. It the sends an ack back to the
processing telling it to proceed.

5. suspend_userui does the necessary preparation, and sends a USERUI_MSG_READY
when it's done its preparation.  It then simply waits for events to occur and
process them.

6. At any point, the userui process can send a USERUI_MSG_SET_PROGRESS_GRANULARITY
message to the kernel, to specify what granularity of progress events are worth
displaying. For example, a text progress bar might be able to show more than 80
different progress amounts, so it would set granularity to 80, where as a
framebuffer progress bar might use some function of the screen width instead.

7. suspend_userui sends messages to the userui process to inform it about the
progress of suspending and any keypress events (if HANDLE_KEYPRESSES_IN_KERNEL
is not defined).

Life goes on...
