Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions common/src/txe_timer_change.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/

// Some portions generated by Copilot (Opus 5).


/**************************************************************************/
/**************************************************************************/
Expand All @@ -26,8 +28,6 @@
/* Include necessary system files. */

#include "tx_api.h"
#include "tx_initialize.h"
#include "tx_thread.h"
#include "tx_timer.h"


Expand Down Expand Up @@ -56,7 +56,6 @@
/* */
/* TX_TIMER_ERROR Invalid application timer pointer */
/* TX_TICK_ERROR Invalid initial tick value of 0 */
/* TX_CALLER_ERROR Invalid caller of this function */
/* status Actual completion status */
/* */
/* CALLS */
Expand Down Expand Up @@ -98,13 +97,6 @@ UINT status;
status = TX_TICK_ERROR;
}

/* Check for invalid caller of this function. */
else if (TX_THREAD_GET_SYSTEM_STATE() >= TX_INITIALIZE_IN_PROGRESS)
{

/* Invalid caller of this function, return appropriate error code. */
status = TX_CALLER_ERROR;
}
else
{

Expand Down
12 changes: 2 additions & 10 deletions common_smp/src/txe_timer_change.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/

// Some portions generated by Copilot (Opus 5).


/**************************************************************************/
/**************************************************************************/
Expand All @@ -26,8 +28,6 @@
/* Include necessary system files. */

#include "tx_api.h"
#include "tx_initialize.h"
#include "tx_thread.h"
#include "tx_timer.h"


Expand Down Expand Up @@ -56,7 +56,6 @@
/* */
/* TX_TIMER_ERROR Invalid application timer pointer */
/* TX_TICK_ERROR Invalid initial tick value of 0 */
/* TX_CALLER_ERROR Invalid caller of this function */
/* status Actual completion status */
/* */
/* CALLS */
Expand Down Expand Up @@ -98,13 +97,6 @@ UINT status;
status = TX_TICK_ERROR;
}

/* Check for invalid caller of this function. */
else if (TX_THREAD_GET_SYSTEM_STATE() >= TX_INITIALIZE_IN_PROGRESS)
{

/* Invalid caller of this function, return appropriate error code. */
status = TX_CALLER_ERROR;
}
else
{

Expand Down
7 changes: 7 additions & 0 deletions test/smp/regression/testcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

/* This is the test control routine of the ThreadX kernel. All tests are dispatched from this routine. */
// Some portions generated by Codex (gpt 5.5).
// Some portions generated by Copilot (Opus 5).

#define TX_THREAD_SMP_SOURCE_CODE

Expand Down Expand Up @@ -65,6 +66,7 @@ TX_BLOCK_POOL init_block_pool;
ULONG init_block_pool_area[50];
TX_EVENT_FLAGS_GROUP init_event_flags;
TX_TIMER init_timer;
TX_TIMER init_timer_change;
TX_THREAD init_test_thread;
TX_THREAD second_test_thread;
#ifndef TX_TIMER_PROCESS_IN_ISR
Expand Down Expand Up @@ -692,6 +694,11 @@ TX_THREAD *thread_ptr;
test_timer_create_init = tx_timer_create(&init_timer, "init timer", init_timer_entry, 0x5678,
100, 200, TX_AUTO_ACTIVATE);

/* Test timer change from initialization. */
test_timer_create_init += tx_timer_create(&init_timer_change, "init timer change", init_timer_entry, 0x5678,
100, 200, TX_NO_ACTIVATE);
test_timer_create_init += tx_timer_change(&init_timer_change, 50, 100);

/* Test calling tx_thread_relinquish to see if the error checking throws it out. */
tx_thread_relinquish();
#endif
Expand Down
7 changes: 7 additions & 0 deletions test/tx/regression/testcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

/* This is the test control routine of the ThreadX kernel. All tests are dispatched from this routine. */
// Some portions generated by Codex (gpt 5.4).
// Some portions generated by Copilot (Opus 5).

#include "tx_api.h"
#include <stdio.h>
Expand Down Expand Up @@ -69,6 +70,7 @@ TX_BLOCK_POOL init_block_pool;
ULONG init_block_pool_area[50];
TX_EVENT_FLAGS_GROUP init_event_flags;
TX_TIMER init_timer;
TX_TIMER init_timer_change;
TX_THREAD init_test_thread;
TX_THREAD second_test_thread;
#ifndef TX_TIMER_PROCESS_IN_ISR
Expand Down Expand Up @@ -567,6 +569,11 @@ TX_THREAD *thread_ptr;
test_timer_create_init = tx_timer_create(&init_timer, "init timer", init_timer_entry, 0x5678,
100, 200, TX_AUTO_ACTIVATE);

/* Test timer change from initialization. */
test_timer_create_init += tx_timer_create(&init_timer_change, "init timer change", init_timer_entry, 0x5678,
100, 200, TX_NO_ACTIVATE);
test_timer_create_init += tx_timer_change(&init_timer_change, 50, 100);

/* Test calling tx_thread_relinquish to see if the error checking throws it out. */
tx_thread_relinquish();
#endif
Expand Down
Loading