diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2024-01-19 19:49:36 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2024-02-11 01:40:29 +0000 |
commit | 096fe82004b1ff8671c0dc1c0279d5b34873efb6 (patch) | |
tree | f435a8f81964cb516f20d6cdebb0b70cedcfadba /sys/sys | |
parent | e4345a107bb4492a9b43d45f5afc9d36061bee1a (diff) | |
download | src-096fe82004b1ff8671c0dc1c0279d5b34873efb6.tar.gz src-096fe82004b1ff8671c0dc1c0279d5b34873efb6.zip |
Add kcmp(2) kernel bits
(cherry picked from commit d8decc9ae31af7ffc77276c89639fb13eb1020cc)
Diffstat (limited to 'sys/sys')
-rw-r--r-- | sys/sys/syscallsubr.h | 2 | ||||
-rw-r--r-- | sys/sys/systm.h | 2 | ||||
-rw-r--r-- | sys/sys/unistd.h | 7 |
3 files changed, 11 insertions, 0 deletions
diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 77c16d8fffc0..c0ae30dff3c7 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -177,6 +177,8 @@ int kern_ioctl(struct thread *td, int fd, u_long com, caddr_t data); int kern_jail(struct thread *td, struct jail *j); int kern_jail_get(struct thread *td, struct uio *options, int flags); int kern_jail_set(struct thread *td, struct uio *options, int flags); +int kern_kcmp(struct thread *td, pid_t pid1, pid_t pid2, int type, + uintptr_t idx1, uintptr_t idx2); int kern_kevent(struct thread *td, int fd, int nchanges, int nevents, struct kevent_copyops *k_ops, const struct timespec *timeout); int kern_kevent_anonymous(struct thread *td, int nevents, diff --git a/sys/sys/systm.h b/sys/sys/systm.h index bffa4c93c8f2..dcfe84e91cc2 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -455,6 +455,8 @@ int poll_no_poll(int events); /* XXX: Should be void nanodelay(u_int nsec); */ void DELAY(int usec); +int kcmp_cmp(uintptr_t a, uintptr_t b); + /* Root mount holdback API */ struct root_hold_token { int flags; diff --git a/sys/sys/unistd.h b/sys/sys/unistd.h index 6adca008f955..93c6658a009a 100644 --- a/sys/sys/unistd.h +++ b/sys/sys/unistd.h @@ -196,6 +196,13 @@ RFPROCDESC | RFSPAWN | RFPPWAIT) #define RFKERNELONLY (RFSTOPPED | RFHIGHPID | RFPROCDESC) +/* kcmp() options. */ +#define KCMP_FILE 100 +#define KCMP_FILEOBJ 101 +#define KCMP_FILES 102 +#define KCMP_SIGHAND 103 +#define KCMP_VM 104 + #define SWAPOFF_FORCE 0x00000001 /* |