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

CI notes

  • Current required eclipsefdn/eca failure says the PR author is not covered by the required Eclipse legal agreements.
  • This is an account/legal gate, not a code failure in the IAR file-lock mutex diff.

@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
@fdesbiens

Copy link
Copy Markdown
Contributor

Thank you for this contribution, @Old-Ding.

Before we can accept it, you need to sign the Eclipse Contributor Agreement (ECA). The purpose of the ECA is to provide a written record that you have agreed to provide your code and documentation contributions under the licenses used by the Eclipse ThreadX project. It also makes it clear that you are promising that what you are contributing to Eclipse is code you wrote, and you have the necessary rights to contribute it to our projects. And finally, it documents a commitment from you that your open source contributions will be permanently on the public record.

Signing the ECA requires an Eclipse Foundation account if you do not already have one. You can create one for free at https://accounts.eclipse.org.

Be sure to use the same email address when you register for the account that you intend to use on Git commit records. Also, please add your GitHub ID to your Eclipse account. This enables synchronisation between Eclipse-owned infrastructure and GitHub.

Here is the link to sign the ECA:
https://accounts.eclipse.org/user/login?destination=user/eca

@fdesbiens

Copy link
Copy Markdown
Contributor

Also, another comment.

If this contribution has been assisted or authored by AI, make sure you conform to the official Generative Artificial Intelligence Usage Guidelines for Eclipse Committers found in the project handbook.

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.

2 participants