From e6bdf57820121b6eac9f35c8ef53a4e7a76205e1 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Sun, 20 May 2018 18:18:40 -0400 Subject: Better hal_core_alloc() semantics, assert() and printf() cleanup. Various fixes extracted from the abandoned(-for-now?) reuse-cores branch, principally: * Change hal_core_alloc*() to support core reuse and to pick the least-recently-used core of a particular type otherwise; * Replace assert() and printf() calls with hal_assert() and hal_log(), respectively. assert() is particularly useless on the HSM, since it sends its error message into hyperspace then hangs the HSM. --- rpc_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rpc_serial.c') diff --git a/rpc_serial.c b/rpc_serial.c index 0e0e6ff..bae8b83 100644 --- a/rpc_serial.c +++ b/rpc_serial.c @@ -92,7 +92,7 @@ hal_error_t hal_serial_init(const char * const device, const uint32_t speed) termios_speed = B921600; break; default: - fprintf(stderr, "invalid line speed %lu\n", (unsigned long) speed); + hal_log(HAL_LOG_ERROR, "invalid line speed %lu\n", (unsigned long) speed); return HAL_ERROR_RPC_TRANSPORT; } -- cgit v1.2.3