Skip to content

Commit

Permalink
For OAM-100850
Browse files Browse the repository at this point in the history
  • Loading branch information
renchenglei committed Feb 6, 2022
1 parent ffce184 commit f0b6215
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions uio/UioDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ int UioDisplay::init() {
// zero and notify the client we are starting
memset(&(app.shmHeader->frame ), 0, sizeof(KVMFRFrame ));
app.shmHeader->flags &= ~KVMFR_HEADER_FLAG_RESTART;
app.running = true;
app.running = false;
mThread = std::unique_ptr<std::thread>(new std::thread(&UioDisplay::threadProc, this));
return 0;
}
Expand Down Expand Up @@ -163,8 +163,13 @@ int UioDisplay::postFb(buffer_handle_t fb) {

void UioDisplay::threadProc() {
while (true) {
if (app.shmHeader->flags & KVMFR_HEADER_FLAG_RESTART)
if (app.shmHeader->flags & KVMFR_HEADER_FLAG_RESTART) {
app.shmHeader->flags &= ~KVMFR_HEADER_FLAG_RESTART;
usleep(16000);
app.running = false;
sleep(5);
app.running = true;
} else {
usleep(16000);
}
}
}

0 comments on commit f0b6215

Please sign in to comment.