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:
Treehugger Robot 2020-10-07 22:11:31 +00:00 committed by Automerger Merge Worker
commit ca1925f900

View file

@ -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;
}