Skip to content

Commit 09751d0

Browse files
authored
Merge pull request #467 from eclipse-threadx/smp-test-fix
Completed the implementation of a configurable queue max size.
2 parents ea408eb + b8530b5 commit 09751d0

File tree

4 files changed

+430
-7
lines changed

4 files changed

+430
-7
lines changed

common_smp/src/txe_queue_create.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ TX_THREAD *thread_ptr;
178178
status = TX_SIZE_ERROR;
179179
}
180180

181-
/* Check for an invalid message size - greater than 16. */
182-
else if (message_size > TX_16_ULONG)
181+
/* Check for an invalid message sizegreater than TX_QUEUE_MESSAGE_MAX_SIZE 16 by default. */
182+
else if (message_size > TX_QUEUE_MESSAGE_MAX_SIZE)
183183
{
184184

185185
/* Invalid message size specified. */

test/smp/cmake/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ endif()
2323

2424
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
2525
message(STATUS "Using toolchain file: ${CMAKE_TOOLCHAIN_FILE}.")
26-
set(default_build_coverage "")
27-
set(disable_notify_callbacks_build -DTX_DISABLE_NOTIFY_CALLBACKS)
28-
set(stack_checking_build -DTX_ENABLE_STACK_CHECKING)
29-
set(stack_checking_rand_fill_build -DTX_ENABLE_STACK_CHECKING -DTX_ENABLE_RANDOM_NUMBER_STACK_FILLING)
30-
set(trace_build -DTX_ENABLE_EVENT_TRACE)
26+
set(default_build_coverage -DTX_QUEUE_MESSAGE_MAX_SIZE=32)
27+
set(disable_notify_callbacks_build -DTX_QUEUE_MESSAGE_MAX_SIZE=32 -DTX_DISABLE_NOTIFY_CALLBACKS)
28+
set(stack_checking_build -DTX_QUEUE_MESSAGE_MAX_SIZE=32 -DTX_ENABLE_STACK_CHECKING)
29+
set(stack_checking_rand_fill_build -DTX_QUEUE_MESSAGE_MAX_SIZE=32 -DTX_ENABLE_STACK_CHECKING -DTX_ENABLE_RANDOM_NUMBER_STACK_FILLING)
30+
set(trace_build -DTX_QUEUE_MESSAGE_MAX_SIZE=32 -DTX_ENABLE_EVENT_TRACE)
3131

3232
add_compile_options(
3333
-m32

test/smp/regression/testcontrol.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ TEST_ENTRY test_control_tests[] =
329329
threadx_queue_basic_four_word_application_define,
330330
threadx_queue_basic_eight_word_application_define,
331331
threadx_queue_basic_sixteen_word_application_define,
332+
threadx_queue_basic_max_message_size_application_define,
332333
threadx_queue_empty_suspension_application_define,
333334
threadx_queue_full_suspension_application_define,
334335
threadx_queue_suspension_timeout_application_define,

0 commit comments

Comments
 (0)