X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fopenocd.c;h=7e8b7cdf3ac905eafe8a7ffd1f1991e590403b4b;hb=fe629829f498cde66697a4060618d99a39fa277c;hp=00b33d4dec9b0d1dd37a92d722bd1d5b13a5fd8f;hpb=dee85e5a0032443f0a8907fb3a91b010b8072d01;p=openocd diff --git a/src/openocd.c b/src/openocd.c index 00b33d4d..7e8b7cdf 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -187,7 +187,8 @@ static int handle_init_command(struct command_context_s *cmd_ctx, char *cmd, cha command_context_t *global_cmd_ctx; -static command_context_t *setup_command_handler(void) +/* NB! this fn can be invoked outside this file for non PC hosted builds */ +command_context_t *setup_command_handler(void) { command_context_t *cmd_ctx; @@ -228,6 +229,21 @@ static command_context_t *setup_command_handler(void) int httpd_start(void); void httpd_stop(void); + +#if !BUILD_HTTPD && !BUILD_ECOSBOARD +/* implementations of OpenOCD that uses multithreading needs to know when + * OpenOCD is sleeping. No-op in vanilla OpenOCD + */ +void openocd_sleep_prelude(void) +{ +} + +void openocd_sleep_postlude(void) +{ +} +#endif + + /* normally this is the main() function entry, but if OpenOCD is linked * into application, then this fn will not be invoked, but rather that * application will have it's own implementation of main(). */