You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linux has a very convenient feature of being able to encode POSIX error codes into pointers. This helps create simpler APIs where a pointer is returned but specific error information (beyond NULL return) is also required.
The above is a single implementation used for all architectures, but we may want to consider doing per-architecture header files in case Zephyr supports some architecture with special requirements.
The text was updated successfully, but these errors were encountered:
jhedberg
changed the title
Provide Linux-style IS_ERR()/PTR_ERR()/ERR_PTR() helpers
Provide Linux-style IS_ERR()/PTR_ERR()/ERR_PTR() helpers
Feb 8, 2020
Linux has a very convenient feature of being able to encode POSIX error codes into pointers. This helps create simpler APIs where a pointer is returned but specific error information (beyond NULL return) is also required.
For reference:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/err.h
The above is a single implementation used for all architectures, but we may want to consider doing per-architecture header files in case Zephyr supports some architecture with special requirements.
The text was updated successfully, but these errors were encountered: