Firmware updater: Fix a race condition

avrdude: Handle OOM with configurable handler
This commit is contained in:
Vojtech Kral
2018-08-07 11:28:39 +02:00
committed by bubnikv
parent bd667aad6e
commit 60a0375ff9
14 changed files with 193 additions and 67 deletions

View File

@@ -39,6 +39,12 @@ typedef void (*avrdude_progress_handler_t)(const char *task, unsigned progress,
void avrdude_progress_handler_set(avrdude_progress_handler_t newhandler, void *user_p);
void avrdude_progress_external(const char *task, unsigned progress);
// OOM handler
typedef void (*avrdude_oom_handler_t)(const char *context, void *user_p);
void avrdude_oom_handler_set(avrdude_oom_handler_t newhandler, void *user_p);
void avrdude_oom(const char *context);
// Cancellation
void avrdude_cancel();