mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
Split MAKE_SYSENT into two parts so that the initializer part can be
used separately if one wants to embed the sysent into a larger structure. MFC after: 1 week
This commit is contained in:
parent
c08cbc64dc
commit
591d7b63ca
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=303287
@ -175,13 +175,21 @@ struct syscall_module_data {
|
||||
int flags; /* flags for syscall_register */
|
||||
};
|
||||
|
||||
#define MAKE_SYSENT(syscallname) \
|
||||
static struct sysent syscallname##_sysent = { \
|
||||
(sizeof(struct syscallname ## _args ) \
|
||||
/* separate initialization vector so it can be used in a substructure */
|
||||
#define SYSENT_INIT_VALS(_syscallname) { \
|
||||
.sy_narg = (sizeof(struct _syscallname ## _args ) \
|
||||
/ sizeof(register_t)), \
|
||||
(sy_call_t *)& sys_##syscallname, \
|
||||
SYS_AUE_##syscallname \
|
||||
}
|
||||
.sy_call = (sy_call_t *)&sys_##_syscallname, \
|
||||
.sy_auevent = SYS_AUE_##_syscallname, \
|
||||
.sy_systrace_args_func = NULL, \
|
||||
.sy_entry = 0, \
|
||||
.sy_return = 0, \
|
||||
.sy_flags = 0, \
|
||||
.sy_thrcnt = 0 \
|
||||
}
|
||||
|
||||
#define MAKE_SYSENT(syscallname) \
|
||||
static struct sysent syscallname##_sysent = SYSENT_INIT_VALS(syscallname);
|
||||
|
||||
#define MAKE_SYSENT_COMPAT(syscallname) \
|
||||
static struct sysent syscallname##_sysent = { \
|
||||
|
Loading…
Reference in New Issue
Block a user