Skip to content

Commit e4fdfdf

Browse files
committed
Fix IAR file lock mutex bounds
1 parent b91b03b commit e4fdfdf

26 files changed

Lines changed: 104 additions & 104 deletions

File tree

ports/arm11/iar/src/tx_iar.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ TX_MUTEX *mutex_ptr;
270270
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
271271

272272
/* Check for wrap-around on the next free mutex. */
273-
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
273+
if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
274274
{
275275

276276
/* Yes, set the free index back to 0. */
@@ -287,7 +287,7 @@ TX_MUTEX *mutex_ptr;
287287
}
288288

289289
/* Determine if a free mutex was found. */
290-
if (i >= _MAX_LOCK)
290+
if (i >= _MAX_FLOCK)
291291
{
292292

293293
/* Error! No more free mutexes! */
@@ -678,7 +678,7 @@ TX_MUTEX *mutex_ptr;
678678
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
679679

680680
/* Check for wrap-around on the next free mutex. */
681-
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
681+
if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
682682
{
683683

684684
/* Yes, set the free index back to 0. */
@@ -695,7 +695,7 @@ TX_MUTEX *mutex_ptr;
695695
}
696696

697697
/* Determine if a free mutex was found. */
698-
if (i >= _MAX_LOCK)
698+
if (i >= _MAX_FLOCK)
699699
{
700700

701701
/* Error! No more free mutexes! */

ports/arm9/iar/src/tx_iar.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ TX_MUTEX *mutex_ptr;
270270
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
271271

272272
/* Check for wrap-around on the next free mutex. */
273-
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
273+
if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
274274
{
275275

276276
/* Yes, set the free index back to 0. */
@@ -287,7 +287,7 @@ TX_MUTEX *mutex_ptr;
287287
}
288288

289289
/* Determine if a free mutex was found. */
290-
if (i >= _MAX_LOCK)
290+
if (i >= _MAX_FLOCK)
291291
{
292292

293293
/* Error! No more free mutexes! */
@@ -678,7 +678,7 @@ TX_MUTEX *mutex_ptr;
678678
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
679679

680680
/* Check for wrap-around on the next free mutex. */
681-
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
681+
if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
682682
{
683683

684684
/* Yes, set the free index back to 0. */
@@ -695,7 +695,7 @@ TX_MUTEX *mutex_ptr;
695695
}
696696

697697
/* Determine if a free mutex was found. */
698-
if (i >= _MAX_LOCK)
698+
if (i >= _MAX_FLOCK)
699699
{
700700

701701
/* Error! No more free mutexes! */

ports/cortex_a15/iar/src/tx_iar.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ TX_MUTEX *mutex_ptr;
270270
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
271271

272272
/* Check for wrap-around on the next free mutex. */
273-
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
273+
if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
274274
{
275275

276276
/* Yes, set the free index back to 0. */
@@ -287,7 +287,7 @@ TX_MUTEX *mutex_ptr;
287287
}
288288

289289
/* Determine if a free mutex was found. */
290-
if (i >= _MAX_LOCK)
290+
if (i >= _MAX_FLOCK)
291291
{
292292

293293
/* Error! No more free mutexes! */
@@ -678,7 +678,7 @@ TX_MUTEX *mutex_ptr;
678678
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
679679

680680
/* Check for wrap-around on the next free mutex. */
681-
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
681+
if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
682682
{
683683

684684
/* Yes, set the free index back to 0. */
@@ -695,7 +695,7 @@ TX_MUTEX *mutex_ptr;
695695
}
696696

697697
/* Determine if a free mutex was found. */
698-
if (i >= _MAX_LOCK)
698+
if (i >= _MAX_FLOCK)
699699
{
700700

701701
/* Error! No more free mutexes! */

ports/cortex_a5/iar/src/tx_iar.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ TX_MUTEX *mutex_ptr;
270270
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
271271

272272
/* Check for wrap-around on the next free mutex. */
273-
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
273+
if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
274274
{
275275

276276
/* Yes, set the free index back to 0. */
@@ -287,7 +287,7 @@ TX_MUTEX *mutex_ptr;
287287
}
288288

289289
/* Determine if a free mutex was found. */
290-
if (i >= _MAX_LOCK)
290+
if (i >= _MAX_FLOCK)
291291
{
292292

293293
/* Error! No more free mutexes! */
@@ -678,7 +678,7 @@ TX_MUTEX *mutex_ptr;
678678
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
679679

680680
/* Check for wrap-around on the next free mutex. */
681-
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
681+
if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
682682
{
683683

684684
/* Yes, set the free index back to 0. */
@@ -695,7 +695,7 @@ TX_MUTEX *mutex_ptr;
695695
}
696696

697697
/* Determine if a free mutex was found. */
698-
if (i >= _MAX_LOCK)
698+
if (i >= _MAX_FLOCK)
699699
{
700700

701701
/* Error! No more free mutexes! */

ports/cortex_a7/iar/src/tx_iar.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ TX_MUTEX *mutex_ptr;
270270
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
271271

272272
/* Check for wrap-around on the next free mutex. */
273-
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
273+
if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
274274
{
275275

276276
/* Yes, set the free index back to 0. */
@@ -287,7 +287,7 @@ TX_MUTEX *mutex_ptr;
287287
}
288288

289289
/* Determine if a free mutex was found. */
290-
if (i >= _MAX_LOCK)
290+
if (i >= _MAX_FLOCK)
291291
{
292292

293293
/* Error! No more free mutexes! */
@@ -678,7 +678,7 @@ TX_MUTEX *mutex_ptr;
678678
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
679679

680680
/* Check for wrap-around on the next free mutex. */
681-
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
681+
if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
682682
{
683683

684684
/* Yes, set the free index back to 0. */
@@ -695,7 +695,7 @@ TX_MUTEX *mutex_ptr;
695695
}
696696

697697
/* Determine if a free mutex was found. */
698-
if (i >= _MAX_LOCK)
698+
if (i >= _MAX_FLOCK)
699699
{
700700

701701
/* Error! No more free mutexes! */

ports/cortex_a8/iar/src/tx_iar.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ TX_MUTEX *mutex_ptr;
270270
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
271271

272272
/* Check for wrap-around on the next free mutex. */
273-
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
273+
if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
274274
{
275275

276276
/* Yes, set the free index back to 0. */
@@ -287,7 +287,7 @@ TX_MUTEX *mutex_ptr;
287287
}
288288

289289
/* Determine if a free mutex was found. */
290-
if (i >= _MAX_LOCK)
290+
if (i >= _MAX_FLOCK)
291291
{
292292

293293
/* Error! No more free mutexes! */
@@ -678,7 +678,7 @@ TX_MUTEX *mutex_ptr;
678678
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
679679

680680
/* Check for wrap-around on the next free mutex. */
681-
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
681+
if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
682682
{
683683

684684
/* Yes, set the free index back to 0. */
@@ -695,7 +695,7 @@ TX_MUTEX *mutex_ptr;
695695
}
696696

697697
/* Determine if a free mutex was found. */
698-
if (i >= _MAX_LOCK)
698+
if (i >= _MAX_FLOCK)
699699
{
700700

701701
/* Error! No more free mutexes! */

ports/cortex_a9/iar/src/tx_iar.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ TX_MUTEX *mutex_ptr;
270270
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
271271

272272
/* Check for wrap-around on the next free mutex. */
273-
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
273+
if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
274274
{
275275

276276
/* Yes, set the free index back to 0. */
@@ -287,7 +287,7 @@ TX_MUTEX *mutex_ptr;
287287
}
288288

289289
/* Determine if a free mutex was found. */
290-
if (i >= _MAX_LOCK)
290+
if (i >= _MAX_FLOCK)
291291
{
292292

293293
/* Error! No more free mutexes! */
@@ -678,7 +678,7 @@ TX_MUTEX *mutex_ptr;
678678
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
679679

680680
/* Check for wrap-around on the next free mutex. */
681-
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
681+
if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
682682
{
683683

684684
/* Yes, set the free index back to 0. */
@@ -695,7 +695,7 @@ TX_MUTEX *mutex_ptr;
695695
}
696696

697697
/* Determine if a free mutex was found. */
698-
if (i >= _MAX_LOCK)
698+
if (i >= _MAX_FLOCK)
699699
{
700700

701701
/* Error! No more free mutexes! */

ports/cortex_m0/iar/src/tx_iar.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ TX_MUTEX *mutex_ptr;
270270
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
271271

272272
/* Check for wrap-around on the next free mutex. */
273-
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
273+
if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
274274
{
275275

276276
/* Yes, set the free index back to 0. */
@@ -287,7 +287,7 @@ TX_MUTEX *mutex_ptr;
287287
}
288288

289289
/* Determine if a free mutex was found. */
290-
if (i >= _MAX_LOCK)
290+
if (i >= _MAX_FLOCK)
291291
{
292292

293293
/* Error! No more free mutexes! */
@@ -678,7 +678,7 @@ TX_MUTEX *mutex_ptr;
678678
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
679679

680680
/* Check for wrap-around on the next free mutex. */
681-
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
681+
if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
682682
{
683683

684684
/* Yes, set the free index back to 0. */
@@ -695,7 +695,7 @@ TX_MUTEX *mutex_ptr;
695695
}
696696

697697
/* Determine if a free mutex was found. */
698-
if (i >= _MAX_LOCK)
698+
if (i >= _MAX_FLOCK)
699699
{
700700

701701
/* Error! No more free mutexes! */

ports/cortex_m23/iar/src/tx_iar.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ TX_MUTEX *mutex_ptr;
270270
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
271271

272272
/* Check for wrap-around on the next free mutex. */
273-
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
273+
if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
274274
{
275275

276276
/* Yes, set the free index back to 0. */
@@ -287,7 +287,7 @@ TX_MUTEX *mutex_ptr;
287287
}
288288

289289
/* Determine if a free mutex was found. */
290-
if (i >= _MAX_LOCK)
290+
if (i >= _MAX_FLOCK)
291291
{
292292

293293
/* Error! No more free mutexes! */
@@ -678,7 +678,7 @@ TX_MUTEX *mutex_ptr;
678678
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
679679

680680
/* Check for wrap-around on the next free mutex. */
681-
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
681+
if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
682682
{
683683

684684
/* Yes, set the free index back to 0. */
@@ -695,7 +695,7 @@ TX_MUTEX *mutex_ptr;
695695
}
696696

697697
/* Determine if a free mutex was found. */
698-
if (i >= _MAX_LOCK)
698+
if (i >= _MAX_FLOCK)
699699
{
700700

701701
/* Error! No more free mutexes! */

ports/cortex_m3/iar/src/tx_iar.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ TX_MUTEX *mutex_ptr;
270270
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
271271

272272
/* Check for wrap-around on the next free mutex. */
273-
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
273+
if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
274274
{
275275

276276
/* Yes, set the free index back to 0. */
@@ -287,7 +287,7 @@ TX_MUTEX *mutex_ptr;
287287
}
288288

289289
/* Determine if a free mutex was found. */
290-
if (i >= _MAX_LOCK)
290+
if (i >= _MAX_FLOCK)
291291
{
292292

293293
/* Error! No more free mutexes! */
@@ -678,7 +678,7 @@ TX_MUTEX *mutex_ptr;
678678
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
679679

680680
/* Check for wrap-around on the next free mutex. */
681-
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
681+
if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK)
682682
{
683683

684684
/* Yes, set the free index back to 0. */
@@ -695,7 +695,7 @@ TX_MUTEX *mutex_ptr;
695695
}
696696

697697
/* Determine if a free mutex was found. */
698-
if (i >= _MAX_LOCK)
698+
if (i >= _MAX_FLOCK)
699699
{
700700

701701
/* Error! No more free mutexes! */

0 commit comments

Comments
 (0)