panda: non-returning openocd-loop at terminate

Previously for correct termination, the PandaController called
the finish-function of the openocd wrapper, invoked a coroutine
switch and waited for the openocd wrapper to finish up and switch
coroutine again, so the PandaController could exit with correct
exitStatus. Now the openocd-wrapper directly exits with chosen
exit status.

Change-Id: I8d318a4143c53340896ccee4d059a0d79fdcfe89
This commit is contained in:
Lars Rademacher
2013-10-24 11:05:38 +02:00
parent 5638a7473e
commit 582459c5bb
4 changed files with 8 additions and 11 deletions

View File

@ -2,6 +2,7 @@
#define __OOCD_WRAPPER_H_
#include <stdint.h>
#include <cstdlib>
#define OOCD_CONF_FILE_PATH "@OOCD_CONF_FILE_PATH@"
#define OOCD_CONF_FILES_PATH "@OOCD_CONF_FILES_PATH@"
@ -81,7 +82,7 @@ void oocdw_reboot();
* Before returning, another coroutine-switch is called, so the
* experiment is able to exit in desired state.
*/
void oocdw_finish();
void oocdw_finish(int exCode = EXIT_SUCCESS);
/*
* Read data from pandaboard memory