Skip to content

Commit 1852929

Browse files
committed
For OAM-100850
1 parent ffce184 commit 1852929

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

uio/UioDisplay.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ int UioDisplay::init() {
121121
// zero and notify the client we are starting
122122
memset(&(app.shmHeader->frame ), 0, sizeof(KVMFRFrame ));
123123
app.shmHeader->flags &= ~KVMFR_HEADER_FLAG_RESTART;
124-
app.running = true;
124+
app.running = false;
125125
mThread = std::unique_ptr<std::thread>(new std::thread(&UioDisplay::threadProc, this));
126126
return 0;
127127
}
@@ -163,8 +163,13 @@ int UioDisplay::postFb(buffer_handle_t fb) {
163163

164164
void UioDisplay::threadProc() {
165165
while (true) {
166-
if (app.shmHeader->flags & KVMFR_HEADER_FLAG_RESTART)
166+
if (app.shmHeader->flags & KVMFR_HEADER_FLAG_RESTART) {
167+
app.running = false;
167168
app.shmHeader->flags &= ~KVMFR_HEADER_FLAG_RESTART;
168-
usleep(16000);
169+
sleep(5);
170+
app.running = true;
171+
} else {
172+
usleep(16000);
173+
}
169174
}
170175
}

0 commit comments

Comments
 (0)