syscall: Introduce __syscall_always_inline
Sometimes we want to force the inlining of a __syscall. Introduce a new __syscall_always_inline symbol to do that. Signed-off-by: Carlo Caione <ccaione@baylibre.com>
This commit is contained in:
parent
826d35b188
commit
de90dfccbc
|
@ -24,6 +24,7 @@ AttributeMacros:
|
|||
- __packed
|
||||
- __printf_like
|
||||
- __syscall
|
||||
- __syscall_always_inline
|
||||
- __subsystem
|
||||
BitFieldColonSpacing: After
|
||||
BreakBeforeBraces: Linux
|
||||
|
|
|
@ -232,6 +232,7 @@ breathe_default_members = ("members", )
|
|||
|
||||
cpp_id_attributes = [
|
||||
"__syscall",
|
||||
"__syscall_always_inline",
|
||||
"__deprecated",
|
||||
"__may_alias",
|
||||
"__used",
|
||||
|
|
|
@ -2397,6 +2397,7 @@ PREDEFINED = __DOXYGEN__ \
|
|||
"__printf_like(x, y)=" \
|
||||
__attribute__(x)= \
|
||||
__syscall= \
|
||||
__syscall_always_inline= \
|
||||
__must_check= \
|
||||
"ATOMIC_DEFINE(x, y)=atomic_t x[ATOMIC_BITMAP_SIZE(y)]"
|
||||
|
||||
|
|
|
@ -143,8 +143,10 @@
|
|||
*/
|
||||
#ifndef ZTEST_UNITTEST
|
||||
#define __syscall static inline
|
||||
#define __syscall_always_inline static inline __attribute__((always_inline))
|
||||
#else
|
||||
#define __syscall
|
||||
#define __syscall_always_inline
|
||||
#endif /* ZTEST_UNITTEST */
|
||||
|
||||
/* Definitions for struct declaration tags. These are sentinel values used by
|
||||
|
|
|
@ -33,11 +33,11 @@ import json
|
|||
regex_flags = re.MULTILINE | re.VERBOSE
|
||||
|
||||
syscall_regex = re.compile(r'''
|
||||
__syscall\s+ # __syscall attribute, must be first
|
||||
([^(]+) # type and name of system call (split later)
|
||||
[(] # Function opening parenthesis
|
||||
([^)]*) # Arg list (split later)
|
||||
[)] # Closing parenthesis
|
||||
(?:__syscall|__syscall_always_inline)\s+ # __syscall attribute, must be first
|
||||
([^(]+) # type and name of system call (split later)
|
||||
[(] # Function opening parenthesis
|
||||
([^)]*) # Arg list (split later)
|
||||
[)] # Closing parenthesis
|
||||
''', regex_flags)
|
||||
|
||||
struct_tags = ["__subsystem", "__net_socket"]
|
||||
|
|
Loading…
Reference in New Issue