Skip to content

include: Add a macro to check pointer alignment against boundary #54156

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

Merged
merged 1 commit into from
Jan 27, 2023

Conversation

heinwessels
Copy link
Contributor

Add a new macro, IS_PTR_ALIGNED_BYTES() that verifies if a pointer is aligned against a specific byte boundary supplied as argument.

Signed-off-by: Hein Wessels [email protected]

Add a new macro, IS_PTR_ALIGNED_BYTES() that verifies if a pointer
is aligned against a specific byte boundary supplied as argument.

Signed-off-by: Hein Wessels <[email protected]>
@heinwessels
Copy link
Contributor Author

heinwessels commented Jan 27, 2023

Another option is to rename the current IS_PTR_ALIGNED -> IS_PTR_ALIGNED_TYPE, and then call this added function IS_PTR_ALIGNED. However, this might cause problems for people already using IS_PTR_ALIGNED in they're own applications/OOT-drivers.

@laurenmurphyx64 laurenmurphyx64 merged commit 9811254 into zephyrproject-rtos:main Jan 27, 2023
@heinwessels heinwessels deleted the ptr-align-bytes branch January 27, 2023 23:19
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.

4 participants