lock execution thread before exiting (#935)

This commit is contained in:
Peli de Halleux 2019-10-02 12:40:45 -07:00 committed by GitHub
parent 018a1e7528
commit 2079173dfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -524,6 +524,7 @@ void stopProgram() {
} }
extern "C" void target_reset() { extern "C" void target_reset() {
pthread_mutex_trylock(&execMutex);
stopMotors(); stopMotors();
stopProgram(); stopProgram();
if (lmsPid) if (lmsPid)