Skip to content

Rename macro functions starting with two or three underscores #14447

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

Closed
pfl opened this issue Mar 13, 2019 · 1 comment · Fixed by #14585
Closed

Rename macro functions starting with two or three underscores #14447

pfl opened this issue Mar 13, 2019 · 1 comment · Fixed by #14585
Assignees
Labels
area: MISRA-C bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@pfl
Copy link
Collaborator

pfl commented Mar 13, 2019

In kernel/ directory the following code snippet of function looking macros starting with two and three underscores are defined:

#define Z_SYSCALL_CONCAT(arg1, arg2) __SYSCALL_CONCAT(arg1, arg2)
#define __SYSCALL_CONCAT(arg1, arg2) ___SYSCALL_CONCAT(arg1, arg2)
#define ___SYSCALL_CONCAT(arg1, arg2) arg1##arg2

#define Z_SYSCALL_NARG(...) __SYSCALL_NARG(__VA_ARGS__, __SYSCALL_RSEQ_N())
#define __SYSCALL_NARG(...) __SYSCALL_ARG_N(__VA_ARGS__)
#define __SYSCALL_ARG_N(_1, _2, _3, _4, _5, _6, _7, N, ...) N
#define __SYSCALL_RSEQ_N() 6, 5, 4, 3, 2, 1, 0

The macro with only one leading underscore was renamed earlier in #13379 to start with the 'Z_' prefix. The issue to be fixed is to find a suitable prefix for the rest of the macros starting with __ and ___.

@pfl pfl added bug The issue is a bug, or the PR is fixing a bug area: MISRA-C labels Mar 13, 2019
@pfl
Copy link
Collaborator Author

pfl commented Mar 13, 2019

This issue belongs to #9882

@pfl pfl changed the title Rename functions starting with two or three underscores Rename macro functions starting with two or three underscores Mar 13, 2019
@rljordan-zz rljordan-zz added the priority: low Low impact/importance bug label Mar 15, 2019
andrewboie pushed a commit to andrewboie/zephyr that referenced this issue Mar 15, 2019
These private macros are now all prefixed with Z_.

Fixes: zephyrproject-rtos#14447

Signed-off-by: Andrew Boie <[email protected]>
andrewboie pushed a commit that referenced this issue Mar 18, 2019
These private macros are now all prefixed with Z_.

Fixes: #14447

Signed-off-by: Andrew Boie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: MISRA-C bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants