Skip to content

[codex] Fix IAR file lock mutex bounds#567

Draft
Old-Ding wants to merge 1 commit into
eclipse-threadx:masterfrom
Old-Ding:fix/iar-file-lock-max-flock
Draft

[codex] Fix IAR file lock mutex bounds#567
Old-Ding wants to merge 1 commit into
eclipse-threadx:masterfrom
Old-Ding:fix/iar-file-lock-max-flock

Conversation

@Old-Ding

@Old-Ding Old-Ding commented Jul 2, 2026

Copy link
Copy Markdown

Summary

  • update IAR file lock mutex allocation bounds to use _MAX_FLOCK
  • keep system lock allocation bounds on _MAX_LOCK
  • apply the same fix across the duplicated IAR ThreadX port sources

Root cause

The file lock mutex pool is sized with _MAX_FLOCK, but its round-robin allocation checks used _MAX_LOCK in two places. When _MAX_FLOCK is larger than _MAX_LOCK, the allocator can wrap or report exhaustion using the system-lock limit instead of the file-lock pool size.

Validation

  • git diff --check
  • verified all 26 changed files only replace the file-lock wrap/no-free checks from _MAX_LOCK to _MAX_FLOCK
  • verified no remaining file_lock references use _MAX_LOCK

@Old-Ding Old-Ding force-pushed the fix/iar-file-lock-max-flock branch from 29ba95c to e4fdfdf Compare July 2, 2026 07:27
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
@Old-Ding Old-Ding force-pushed the fix/iar-file-lock-max-flock branch from e4fdfdf to d24bb49 Compare July 2, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant