Merge "block_suspend: avoid CPU spinloop"

This commit is contained in:
Treehugger Robot 2020-10-07 21:58:30 +00:00 committed by Gerrit Code Review
commit 9a3f98fe6d

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