Skip to content

Added opt-in pointer callback mode and pointer creation APIs - #819

Open
Dev10-sys wants to merge 1 commit into
eclipse-threadx:devfrom
Dev10-sys:feature/pointer-callback-mode
Open

Dev10-sys wants to merge 1 commit into
eclipse-threadx:devfrom
Dev10-sys:feature/pointer-callback-mode

Conversation

@Dev10-sys

@Dev10-sys Dev10-sys commented Oct 22, 2026 •

Copy link
Copy Markdown

Fixes #771, fixes #772

In 64-bit systems, pointers were getting cut off when passed to thread and timer callbacks because ThreadX was using 32-bit ULONG for them. To solve this without breaking any old code, I changed the internal callback parameter fields to ALIGN_TYPE so they can hold a full 64-bit pointer. I added new tx_thread_create_ptr and tx_timer_create_ptr functions to pass pointer contexts safely, and added the TX_ENABLE_POINTER_CALLBACKS option to let users use pointers with the standard create functions. I updated both the regular and SMP code, tested the builds, and confirmed that pointer contexts are now passed properly without any truncation.

…#771, eclipse-threadx#772)

Support passing full pointer-width context arguments to thread and timer callbacks on 64-bit architectures without truncation, while maintaining full backward compatibility for existing 32-bit ULONG callbacks.

Signed-off-by: Dev dev <kalpanagola9897@gmail.com>

This branch has not been deployed

No deployments
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