kfdtest: Implement SuspendAndWakeUp()
Change-Id: I16384cd0ca35f15841344ded4d4237a0a862a934
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
[ROCm/ROCR-Runtime commit: 9048fb5a1a]
Dieser Commit ist enthalten in:
@@ -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) {
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren