Commit graph

4 commits

Author SHA1 Message Date
Steve Paik
10b149f18f Add force_suspend function
This CL implements a simple force_suspend().  This function takes a
timeoutMs argument that is currently ignored.  It also uses a two-stage
init process that spawns the suspend_thread when autosuspend is in use.

Follow-up CLs will:
- Implement file locking to prevent multiple libsuspend instances from
starting multiple suspend threads in the system.
- Fully implement timout for force_suspend.
- Integrate force_suspend with suspend_thred.

Bug: 70669809
Test:  autosuspend still works
Change-Id: I6b2c72d0c61d1bec6db0f0b28481ffe0e20ec615
2018-01-19 12:30:39 -08:00
Steve Paik
db88774631 Convert autosuspend_wakeup_count.c to cpp
Change this file to cpp before cleaning it up.

Bug: 70669809
Test:  Suspend works
Change-Id: Ice927dbb205447a94f33b417e32f7c2cd79613eb
2017-12-20 17:02:31 -08:00
Steve Paik
2d44190539 Create wrapper function for set_wakeup_callback
Bug: 70669809
Test:  Compiles

Change-Id: I55f8b9995c2d872504b586addb07a18206da7fbe
2017-12-18 10:22:04 -08:00
Colin Cross
a2582c2c4d libsuspend: create new library to handle triggering suspend
libsuspend provides functions autosuspend_enable() and
autosuspend_disable() to trigger suspend on a variety of different
kernels.

Change-Id: I5dc28fb51532fa7c514330f1cfde7698d31d734c
2012-05-07 15:33:34 -07:00