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.
This commit is contained in:
Haithem Rahmani
2025-03-21 09:28:58 +01:00
parent 7ad78c40e9
commit 87e5110346
9 changed files with 448 additions and 7 deletions

View File

@@ -328,6 +328,12 @@ extern "C" {
#define TX_TIMER_TICKS_PER_SECOND (100UL)
#endif
/* Define the default maximum message size in a queue. The default value is TX_16_ULONG, but may
be customized in tx_user.h or as a compilation option. */
#ifndef TX_QUEUE_MESSAGE_MAX_SIZE
#define TX_QUEUE_MESSAGE_MAX_SIZE TX_16_ULONG
#endif
/* Event numbers 0 through 4095 are reserved by Azure RTOS. Specific event assignments are: