From 87e511034647af30cf96be09149cbaf707be63a2 Mon Sep 17 00:00:00 2001 From: Haithem Rahmani Date: Fri, 21 Mar 2025 09:28:58 +0100 Subject: Make queue max message size configurable Summary ------- This commit fixes the issue #424 Details -------- - Add a the configuration option TX_QUEUE_MESSAGE_MAX_SIZE in the tx_api.h with default value set to TX_ULONG_16 to keep backword compatibility. - Update the txe_queue_create() to check on TX_QUEUE_MESSAGE_MAX_SIZE rather than TX_ULONG_16 as max message size. - Add a new unitary test to cover the new change. --- common/src/txe_queue_create.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/src/txe_queue_create.c') diff --git a/common/src/txe_queue_create.c b/common/src/txe_queue_create.c index 68d3540a..2d91cc9f 100644 --- a/common/src/txe_queue_create.c +++ b/common/src/txe_queue_create.c @@ -178,8 +178,8 @@ TX_THREAD *thread_ptr; status = TX_SIZE_ERROR; } - /* Check for an invalid message size - greater than 16. */ - else if (message_size > TX_16_ULONG) + /* Check for an invalid message size - greater than TX_QUEUE_MESSAGE_MAX_SIZE 16 by default. */ + else if (message_size > TX_QUEUE_MESSAGE_MAX_SIZE) { /* Invalid message size specified. */ -- cgit v1.3.1