From 64d0788f1df1c88d2c95def85647a276a79c895f Mon Sep 17 00:00:00 2001 From: Ronald Caesar Date: Mon, 1 Jun 2026 23:16:02 -0400 Subject: [PATCH] engine: add engine already running error The engine should not be run more than once. Signed-off-by: Ronald Caesar --- include/bal_errors.h | 2 ++ src/bal_errors.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/include/bal_errors.h b/include/bal_errors.h index 18e87427..21ddbff0 100644 --- a/include/bal_errors.h +++ b/include/bal_errors.h @@ -36,6 +36,8 @@ extern "C" /// resources. BAL_ERROR_THREAD_CLEANUP = -8, + BAL_ERROR_ENGINE_ALREADY_RUNNING = -9, + // IR Errors. // BAL_ERROR_INSTRUCTION_OVERFLOW = -100, diff --git a/src/bal_errors.c b/src/bal_errors.c index fbff6a50..d8f55ae6 100644 --- a/src/bal_errors.c +++ b/src/bal_errors.c @@ -27,6 +27,9 @@ bal_error_to_string(const bal_error_t error) case BAL_ERROR_THREAD_CLEANUP: string = "could not clean up thread"; break; + case BAL_ERROR_ENGINE_ALREADY_RUNNING: + string = "engine already running"; + break; case BAL_ERROR_UNKNOWN_INSTRUCTION: string = "failed to decode arm instruction"; break;