-
Notifications
You must be signed in to change notification settings - Fork 796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change thread entry function and timer expiration function prototypes… #227
base: master
Are you sure you want to change the base?
Conversation
… to use an ALIGN_TYPE param instead of an ULONG param , to allow passing pointers to void (or pointers to whatever) in 64 bit architectures.
@phuerta79 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
@microsoft-github-policy-service agree company="Hubbell Inc" |
Hi @phuerta79 - I would like to make this change, but we are discussing this internally. In the meantime, you can use these extensions to pass 64-bit values to threads: https://github.com/azure-rtos/threadx/blob/master/common/inc/tx_api.h#L234-L259 |
Hi @goldscott , |
These functions have an ULONG type param, so if you want to pass a pointer to something you can cast it and it will fit in the ULONG param in 32 bit machines. But in 64 bit machines the pointer will not fit, so I propose to change this param to ALIGN_TYPE type.
For example, the following code will work in 32 bit machines, but it will not work on 64 bit machines:
With the changes proposed, the code will turn into:
And it will work ok both in 32 and 64 bit systems.