Merge "block_suspend: avoid CPU spinloop" am: 9a3f98fe6d
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/1453335 Change-Id: I64dc4f201be5a5c37ddfa5194c276a3c421003bd
This commit is contained in:
commit
ca1925f900
1 changed files with 3 additions and 1 deletions
|
@ -14,6 +14,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <wakelock/wakelock.h>
|
||||
|
@ -33,7 +35,7 @@ int main(int argc, char ** /* argv */) {
|
|||
}
|
||||
|
||||
android::wakelock::WakeLock wl{gWakeLockName}; // RAII object
|
||||
while (true) {};
|
||||
while (true) { sleep(1000000); };
|
||||
std::abort(); // should never reach here
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue