Merge pull request #149 from slsdetectorgroup/stopfix

stopping in virtual server needs a usleep before acquiring lock to ge…
This commit is contained in:
Dhanya Thattil 2020-08-27 18:22:51 +02:00 committed by GitHub
commit 97ee2d269d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 7 additions and 7 deletions

View File

@ -2347,7 +2347,7 @@ int stopStateMachine() {
sharedMemory_setStop(1);
// read till status is idle
while (sharedMemory_getStatus() == RUNNING)
;
usleep(500);
sharedMemory_setStop(0);
LOG(logINFO, ("Stopped State Machine\n"));
return OK;

View File

@ -2217,7 +2217,7 @@ int stopStateMachine() {
sharedMemory_setStop(1);
// read till status is idle
while (sharedMemory_getStatus() == RUNNING)
;
usleep(500);
sharedMemory_setStop(0);
LOG(logINFO, ("Stopped State Machine\n"));
return OK;

View File

@ -2556,7 +2556,7 @@ int stopStateMachine() {
#ifdef VIRTUAL
sharedMemory_setStop(1);
while (sharedMemory_getStatus() == RUNNING)
;
usleep(500);
sharedMemory_setStop(0);
LOG(logINFO, ("Stopped State Machine\n"));
return OK;

View File

@ -1630,7 +1630,7 @@ int stopStateMachine() {
sharedMemory_setStop(1);
// read till status is idle
while (sharedMemory_getStatus() == RUNNING)
;
usleep(500);
sharedMemory_setStop(0);
LOG(logINFO, ("Stopped State Machine\n"));
}

View File

@ -1818,7 +1818,7 @@ int stopStateMachine() {
sharedMemory_setStop(1);
// read till status is idle
while (sharedMemory_getStatus() == RUNNING)
;
usleep(500);
sharedMemory_setStop(0);
LOG(logINFO, ("Stopped State Machine\n"));
return OK;

View File

@ -1980,7 +1980,7 @@ int stopStateMachine() {
sharedMemory_setStop(1);
// read till status is idle
while (sharedMemory_getStatus() == RUNNING)
;
usleep(500);
sharedMemory_setStop(0);
LOG(logINFO, ("Stopped State Machine\n"));
return OK;

View File

@ -2261,7 +2261,7 @@ int stopStateMachine() {
sharedMemory_setStop(1);
// read till status is idle
while (sharedMemory_getStatus() == RUNNING)
;
usleep(500);
sharedMemory_setStop(0);
LOG(logINFO, ("Stopped State Machine\n"));
}