summaryrefslogtreecommitdiff
path: root/ports/cortex_m0/iar/src
diff options
context:
space:
mode:
Diffstat (limited to 'ports/cortex_m0/iar/src')
-rw-r--r--ports/cortex_m0/iar/src/tx_iar.c9
-rw-r--r--ports/cortex_m0/iar/src/tx_thread_system_return.s3
2 files changed, 7 insertions, 5 deletions
diff --git a/ports/cortex_m0/iar/src/tx_iar.c b/ports/cortex_m0/iar/src/tx_iar.c
index 238b485e..ab6c209c 100644
--- a/ports/cortex_m0/iar/src/tx_iar.c
+++ b/ports/cortex_m0/iar/src/tx_iar.c
@@ -9,6 +9,7 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
/**************************************************************************/
/**************************************************************************/
@@ -270,7 +271,7 @@ TX_MUTEX *mutex_ptr;
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
/* Check for wrap-around on the next free mutex. */
- if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
+ if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
{
/* Yes, set the free index back to 0. */
@@ -287,7 +288,7 @@ TX_MUTEX *mutex_ptr;
}
/* Determine if a free mutex was found. */
- if (i >= _MAX_LOCK)
+ if (i >= _MAX_FLOCK)
{
/* Error! No more free mutexes! */
@@ -678,7 +679,7 @@ TX_MUTEX *mutex_ptr;
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
/* Check for wrap-around on the next free mutex. */
- if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
+ if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
{
/* Yes, set the free index back to 0. */
@@ -695,7 +696,7 @@ TX_MUTEX *mutex_ptr;
}
/* Determine if a free mutex was found. */
- if (i >= _MAX_LOCK)
+ if (i >= _MAX_FLOCK)
{
/* Error! No more free mutexes! */
diff --git a/ports/cortex_m0/iar/src/tx_thread_system_return.s b/ports/cortex_m0/iar/src/tx_thread_system_return.s
index 9426a137..929b3a00 100644
--- a/ports/cortex_m0/iar/src/tx_thread_system_return.s
+++ b/ports/cortex_m0/iar/src/tx_thread_system_return.s
@@ -9,7 +9,7 @@
; * SPDX-License-Identifier: MIT
; **************************************************************************/
-; Some portions generated by Gemini (Gemini 2.0 Flash).
+; Portions of this file were generated with AI assistance.
;
;
;/**************************************************************************/
@@ -79,6 +79,7 @@ _tx_thread_system_return:
MRS r1, PRIMASK ; Thread context returning, pickup PRIMASK
CPSIE i ; Enable interrupts
MSR PRIMASK, r1 ; Restore original interrupt posture
+ ISB SY ; Flush pipeline
_isr_context:
BX lr ; Return to caller
;}