linux(4): To reuse MD linux.h hide kernel dependencies unde _KERNEL constraint

MFC after:		2 weeks
This commit is contained in:
Dmitry Chagin 2022-06-22 14:28:24 +03:00
parent ed2f123a21
commit d416ee86c7
3 changed files with 8 additions and 0 deletions

View File

@ -319,6 +319,7 @@ struct linux_pt_regset {
l_ulong gs;
};
#ifdef _KERNEL
struct reg;
struct syscall_info;
@ -330,5 +331,6 @@ void linux_ptrace_get_syscall_info_machdep(const struct reg *reg,
struct syscall_info *si);
int linux_ptrace_getregs_machdep(struct thread *td, pid_t pid,
struct linux_pt_regset *l_regset);
#endif /* _KERNEL */
#endif /* !_AMD64_LINUX_H_ */

View File

@ -426,6 +426,7 @@ struct l_user_desc {
#define LINUX_GET_USEABLE(desc) \
(((desc)->b >> LINUX_ENTRY_B_USEABLE) & 1)
#ifdef _KERNEL
struct iovec;
struct uio;
@ -439,6 +440,7 @@ int linux32_copyiniov(struct l_iovec32 *iovp32, l_ulong iovcnt,
int linux32_copyinuio(struct l_iovec32 *iovp, l_ulong iovcnt,
struct uio **uiop);
int linux_copyout_rusage(struct rusage *ru, void *uaddr);
#endif /* _KERNEL */
/* robust futexes */
struct linux_robust_list {
@ -472,11 +474,13 @@ struct linux_pt_regset32 {
l_uint ss;
};
#ifdef _KERNEL
struct reg32;
void bsd_to_linux_regset32(const struct reg32 *b_reg,
struct linux_pt_regset32 *l_regset);
extern bool linux32_emulate_i386;
#endif /* _KERNEL */
#endif /* !_AMD64_LINUX_H_ */

View File

@ -235,6 +235,7 @@ struct linux_pt_regset {
l_ulong cpsr;
};
#ifdef _KERNEL
struct reg;
struct syscall_info;
@ -246,5 +247,6 @@ void linux_ptrace_get_syscall_info_machdep(const struct reg *reg,
struct syscall_info *si);
int linux_ptrace_getregs_machdep(struct thread *td, pid_t pid,
struct linux_pt_regset *l_regset);
#endif /* _KERNEL */
#endif /* _ARM64_LINUX_H_ */