~asac/powerd/fix-racy-screen-on-and-no-mutex-refactor

Viewing all changes in revision 21.

  • Committer: Tarmac
  • Author(s): Seth Forshee
  • Date: 2013-05-24 17:38:28 UTC
  • mfrom: (20.1.4 display-improvements)
  • Revision ID: tarmac-20130524173828-t85xr5pd3uybciqr
powerd: Protect activity timer with a mutex

The activity timer may be reset from multiple threads. We have
a race whereby we end up with a "lost" timer event that doesn't
get cleared on input activity, thus causing the screen to turn
off while the device is in use. To fix this, serialize access to
the activity timer within reset_activity_timer() with a mutex
and make sure all code uses this function for any any activity
timer updates.

Approved by PS Jenkins bot.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: