title: Linux suspend/resume operations' userspace notification
body: <p>I'm working on an embedded linux platform.</p>
  
  <p>When I do "echo "mem" > /sys/power/state", system will suspend.</p>
  
  <p>I know that kernel and driver can know that suspend operation's coming. But would it be possible that a user space process or application can get the notification that the system will suspend? How?</p>
  
  <p>For example, I have an application who writes 'A' continually into a buffer whose start address is given by a device driver. Would it be possible that this application be notified that the system will suspend so that it could replace all this buffer with 'B' so that when driver is resumed, all what driver sees are 'B'?</p>
  
  <p>Thanks a lot.</p>