kfdtest: Implement SuspendAndWakeUp()
Change-Id: I16384cd0ca35f15841344ded4d4237a0a862a934 Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
This commit is contained in:
1 förälder
01957d4da3
incheckning
9048fb5a1a
3 files changed
+28
-7
No files matched your search
@@ -87,8 +87,22 @@ HSAuint64 GetSystemTickCountInMicroSec() {
|
||||
}
|
||||
|
||||
bool SuspendAndWakeUp() {
|
||||
// TODO: Implement
|
||||
return false;
|
||||
printf("Please press any key after the system suspends....\n");
|
||||
|
||||
// Use "sudo apt install pm-utils" to install the "pm-suspend"
|
||||
int ret = system("sudo pm-suspend");
|
||||
|
||||
if (ret == -1) {
|
||||
printf("The system linux command could not be run!\n");
|
||||
return false;
|
||||
} else {
|
||||
if (WEXITSTATUS(ret)) {
|
||||
printf("Use 'sudo apt install pm-utils' to install 'pm-suspend' on Ubuntu\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void AcquirePrivilege(OS_PRIVILEGE priv) {
|
||||
|
||||
Reference in new issue
Block a user