summaryrefslogtreecommitdiff
path: root/test/smp/regression/threadx_block_memory_basic_test.c
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-03-06 19:27:49 +0100
committerGitHub <[email protected]>2026-03-06 19:27:49 +0100
commit3726d7906b4808bfec7855fc088e073199df9120 (patch)
tree8789bfd03d1d49e1967e80d04aa4ff606fda43eb /test/smp/regression/threadx_block_memory_basic_test.c
parent4b6e8100d932a3a67b34c6eb17f84f3bffb9e2ae (diff)
parentc3259a216026372e3833dd8996a68f77e8595fbd (diff)
Merge pull request #510 from eclipse-threadx/devv6.5.0.202601_rel
Merge changes ahead of the v6.5.0.202601 release
Diffstat (limited to 'test/smp/regression/threadx_block_memory_basic_test.c')
-rw-r--r--test/smp/regression/threadx_block_memory_basic_test.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/test/smp/regression/threadx_block_memory_basic_test.c b/test/smp/regression/threadx_block_memory_basic_test.c
index 5f2afa01..12e301d1 100644
--- a/test/smp/regression/threadx_block_memory_basic_test.c
+++ b/test/smp/regression/threadx_block_memory_basic_test.c
@@ -1,4 +1,4 @@
-/* This test is designed to test simple memory block pool creation, deletion, and
+/* This test is designed to test simple memory block pool creation, deletion, and
allocates and releases. */
#include <stdio.h>
@@ -79,7 +79,7 @@ CHAR *pointer;
/* Determine if calling block pool create from initialization was successful. */
if (test_block_pool_create_init != TX_SUCCESS)
{
-
+
/* Error! */
error++;
}
@@ -87,7 +87,7 @@ CHAR *pointer;
/* Attempt to create a block pool from a timer. */
pointer = (CHAR *) 0x30000;
status = tx_block_pool_create(&pool_3, "pool 3", 100, pointer, 320);
-
+
/* Check status. */
if (status != TX_CALLER_ERROR)
{
@@ -98,7 +98,7 @@ CHAR *pointer;
/* Attempt to delete a block pool. */
status = tx_block_pool_delete(&pool_0);
-
+
/* Check status. */
if (status != TX_CALLER_ERROR)
{
@@ -106,7 +106,7 @@ CHAR *pointer;
/* Error! */
error++;
}
-
+
timer_executed = 1;
/* Attempt to allocate a block with suspension from a timer. */
@@ -190,8 +190,8 @@ CHAR *pointer;
/* Put system definition stuff in here, e.g. thread creates and other assorted
create information. */
- status = tx_thread_create(&thread_0, "thread 0", thread_0_entry, 1,
- pointer, TEST_STACK_SIZE_PRINTF,
+ status = tx_thread_create(&thread_0, "thread 0", thread_0_entry, 1,
+ pointer, TEST_STACK_SIZE_PRINTF,
17, 17, 100, TX_AUTO_START);
pointer = pointer + TEST_STACK_SIZE_PRINTF;
@@ -203,8 +203,8 @@ CHAR *pointer;
test_control_return(1);
}
- status = tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, TEST_STACK_SIZE_PRINTF,
+ status = tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, TEST_STACK_SIZE_PRINTF,
18, 18, 100, TX_DONT_START);
pointer = pointer + TEST_STACK_SIZE_PRINTF;
@@ -278,7 +278,7 @@ unsigned long fake_block[20];
block_memory.second_middle= 0x61718191;
block_memory.next_to_last = 0x99aabbcc;
block_memory.last = 0xddeeff00;
-
+
/* Create the block pool. */
status = tx_block_pool_create(&block_memory.pool, "pool memory", 16, &block_memory.pool_area[0], (2048*sizeof(ULONG))/sizeof(ULONG));
tx_block_pool_delete(&block_memory.pool);
@@ -304,7 +304,7 @@ unsigned long fake_block[20];
fake_block[0] = 0;
fake_block[1] = 0;
status = tx_block_release(&fake_block[2]);
-
+
/* Check status. */
if (status != TX_PTR_ERROR)
{
@@ -318,7 +318,7 @@ unsigned long fake_block[20];
fake_block[0] = 0;
fake_block[1] = (unsigned long) &fake_block[0];
status = tx_block_release(&fake_block[2]);
-
+
/* Check status. */
if (status != TX_PTR_ERROR)
{
@@ -328,7 +328,7 @@ unsigned long fake_block[20];
test_control_return(1);
}
#endif
-
+
/* Allocate first block from the pool. */
status = tx_block_allocate(&pool_0, (VOID **) &pointer_1, TX_NO_WAIT);
@@ -504,10 +504,10 @@ unsigned long fake_block[20];
/* Sleep for a bit... */
tx_thread_sleep(3);
-
+
/* Now resume the background thread. */
tx_thread_resume(&thread_1);
-
+
/* Sleep for a bit... */
tx_thread_sleep(3);
@@ -517,7 +517,7 @@ unsigned long fake_block[20];
/* Test for error. */
if ((error) || (timer_executed != 1) || (isr_executed != 1))
{
-
+
/* Block memory error. */
printf("ERROR #20\n");
test_control_return(1);
@@ -549,7 +549,7 @@ unsigned long fake_block[20];
}
else
{
-
+
/* Successful test. */
printf("SUCCESS!\n");
test_control_return(0);
@@ -562,7 +562,7 @@ static void thread_1_entry(ULONG thread_input)
while(1)
{
-
- tx_thread_relinquish();
+
+ tx_thread_relinquish();
}
}