diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-12-20 11:12:40 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-12-20 13:36:34 +0100 |
commit | 2b2563da953978f63e3e707f758fd600dcd19a32 (patch) | |
tree | a207b096c10788192b56025e8187f14d1b5a978d /freebsd/sys/sys | |
parent | freebsd/if_cpsw: Port. (diff) | |
download | rtems-libbsd-2b2563da953978f63e3e707f758fd600dcd19a32.tar.bz2 |
Update to FreeBSD head 2018-12-20
Git mirror commit 19a6ceb89dbacf74697d493e48c388767126d418.
It includes an update of wpa_supplicant to version 2.7.
It includes an update of the OpenSSL baseline to version 1.1.1a.
Update #3472.
Diffstat (limited to 'freebsd/sys/sys')
-rw-r--r-- | freebsd/sys/sys/bus.h | 7 | ||||
-rw-r--r-- | freebsd/sys/sys/filedesc.h | 14 | ||||
-rw-r--r-- | freebsd/sys/sys/interrupt.h | 4 | ||||
-rw-r--r-- | freebsd/sys/sys/jail.h | 9 | ||||
-rw-r--r-- | freebsd/sys/sys/mount.h | 4 | ||||
-rw-r--r-- | freebsd/sys/sys/mutex.h | 4 | ||||
-rw-r--r-- | freebsd/sys/sys/priv.h | 4 | ||||
-rw-r--r-- | freebsd/sys/sys/proc.h | 24 | ||||
-rw-r--r-- | freebsd/sys/sys/racct.h | 10 | ||||
-rw-r--r-- | freebsd/sys/sys/refcount.h | 2 | ||||
-rw-r--r-- | freebsd/sys/sys/resourcevar.h | 13 | ||||
-rw-r--r-- | freebsd/sys/sys/rman.h | 2 | ||||
-rw-r--r-- | freebsd/sys/sys/sdt.h | 5 | ||||
-rw-r--r-- | freebsd/sys/sys/sockbuf.h | 2 | ||||
-rw-r--r-- | freebsd/sys/sys/sx.h | 1 | ||||
-rw-r--r-- | freebsd/sys/sys/sysctl.h | 12 | ||||
-rw-r--r-- | freebsd/sys/sys/sysproto.h | 51 | ||||
-rw-r--r-- | freebsd/sys/sys/systm.h | 26 | ||||
-rw-r--r-- | freebsd/sys/sys/taskqueue.h | 1 | ||||
-rw-r--r-- | freebsd/sys/sys/user.h | 1 |
20 files changed, 155 insertions, 41 deletions
diff --git a/freebsd/sys/sys/bus.h b/freebsd/sys/sys/bus.h index 74a48f81..8e1ba763 100644 --- a/freebsd/sys/sys/bus.h +++ b/freebsd/sys/sys/bus.h @@ -485,6 +485,10 @@ int bus_generic_suspend(device_t dev); int bus_generic_suspend_child(device_t dev, device_t child); int bus_generic_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); +int bus_generic_suspend_intr(device_t dev, device_t child, + struct resource *irq); +int bus_generic_resume_intr(device_t dev, device_t child, + struct resource *irq); int bus_generic_unmap_resource(device_t dev, device_t child, int type, struct resource *r, struct resource_map *map); @@ -535,6 +539,8 @@ int bus_setup_intr(device_t dev, struct resource *r, int flags, driver_filter_t filter, driver_intr_t handler, void *arg, void **cookiep); int bus_teardown_intr(device_t dev, struct resource *r, void *cookie); +int bus_suspend_intr(device_t dev, struct resource *r); +int bus_resume_intr(device_t dev, struct resource *r); int bus_bind_intr(device_t dev, struct resource *r, int cpu); int bus_describe_intr(device_t dev, struct resource *irq, void *cookie, const char *fmt, ...) __printflike(4, 5); @@ -612,6 +618,7 @@ void device_set_desc(device_t dev, const char* desc); void device_set_desc_copy(device_t dev, const char* desc); int device_set_devclass(device_t dev, const char *classname); int device_set_devclass_fixed(device_t dev, const char *classname); +bool device_is_devclass_fixed(device_t dev); int device_set_driver(device_t dev, driver_t *driver); void device_set_flags(device_t dev, u_int32_t flags); void device_set_softc(device_t dev, void *softc); diff --git a/freebsd/sys/sys/filedesc.h b/freebsd/sys/sys/filedesc.h index a3224f42..857d1fc9 100644 --- a/freebsd/sys/sys/filedesc.h +++ b/freebsd/sys/sys/filedesc.h @@ -173,7 +173,13 @@ enum { struct thread; -void filecaps_init(struct filecaps *fcaps); +static __inline void +filecaps_init(struct filecaps *fcaps) +{ + + bzero(fcaps, sizeof(*fcaps)); + fcaps->fc_nioctls = -1; +} bool filecaps_copy(const struct filecaps *src, struct filecaps *dst, bool locked); void filecaps_move(struct filecaps *src, struct filecaps *dst); @@ -289,7 +295,7 @@ fget_locked(struct filedesc *fdp, int fd) FILEDESC_LOCK_ASSERT(fdp); - if (fd < 0 || fd > fdp->fd_lastfile) + if (__predict_false((u_int)fd >= fdp->fd_nfiles)) return (NULL); return (fdp->fd_ofiles[fd].fde_file); @@ -302,11 +308,11 @@ fdeget_locked(struct filedesc *fdp, int fd) FILEDESC_LOCK_ASSERT(fdp); - if (fd < 0 || fd > fdp->fd_lastfile) + if (__predict_false((u_int)fd >= fdp->fd_nfiles)) return (NULL); fde = &fdp->fd_ofiles[fd]; - if (fde->fde_file == NULL) + if (__predict_false(fde->fde_file == NULL)) return (NULL); return (fde); diff --git a/freebsd/sys/sys/interrupt.h b/freebsd/sys/sys/interrupt.h index 105bb968..5c634054 100644 --- a/freebsd/sys/sys/interrupt.h +++ b/freebsd/sys/sys/interrupt.h @@ -62,6 +62,8 @@ struct intr_handler { #define IH_EXCLUSIVE 0x00000002 /* Exclusive interrupt. */ #define IH_ENTROPY 0x00000004 /* Device is a good entropy source. */ #define IH_DEAD 0x00000008 /* Handler should be removed. */ +#define IH_SUSP 0x00000010 /* Device is powered down. */ +#define IH_CHANGED 0x40000000 /* Handler state is changed. */ #define IH_MPSAFE 0x80000000 /* Handler does not need Giant. */ /* @@ -184,6 +186,8 @@ int intr_event_describe_handler(struct intr_event *ie, void *cookie, int intr_event_destroy(struct intr_event *ie); int intr_event_handle(struct intr_event *ie, struct trapframe *frame); int intr_event_remove_handler(void *cookie); +int intr_event_suspend_handler(void *cookie); +int intr_event_resume_handler(void *cookie); int intr_getaffinity(int irq, int mode, void *mask); void *intr_handler_source(void *cookie); int intr_setaffinity(int irq, int mode, void *mask); diff --git a/freebsd/sys/sys/jail.h b/freebsd/sys/sys/jail.h index c9f24bdd..ccd9f57f 100644 --- a/freebsd/sys/sys/jail.h +++ b/freebsd/sys/sys/jail.h @@ -229,9 +229,16 @@ struct prison_racct { #define PR_ALLOW_SOCKET_AF 0x00000040 #define PR_ALLOW_MLOCK 0x00000080 #define PR_ALLOW_READ_MSGBUF 0x00000100 +#define PR_ALLOW_UNPRIV_DEBUG 0x00000200 #define PR_ALLOW_RESERVED_PORTS 0x00008000 #define PR_ALLOW_KMEM_ACCESS 0x00010000 /* reserved, not used yet */ -#define PR_ALLOW_ALL_STATIC 0x000181ff +#define PR_ALLOW_ALL_STATIC 0x000183ff + +/* + * PR_ALLOW_DIFFERENCES determines which flags are able to be + * different between the parent and child jail upon creation. + */ +#define PR_ALLOW_DIFFERENCES (PR_ALLOW_UNPRIV_DEBUG) /* * OSD methods diff --git a/freebsd/sys/sys/mount.h b/freebsd/sys/sys/mount.h index ac1c215b..2a5d4cff 100644 --- a/freebsd/sys/sys/mount.h +++ b/freebsd/sys/sys/mount.h @@ -932,11 +932,15 @@ void syncer_resume(void); struct stat; __BEGIN_DECLS +int fhlink(struct fhandle *, const char *); +int fhlinkat(struct fhandle *, int, const char *); int fhopen(const struct fhandle *, int); +int fhreadlink(struct fhandle *, char *, size_t); int fhstat(const struct fhandle *, struct stat *); int fhstatfs(const struct fhandle *, struct statfs *); int fstatfs(int, struct statfs *); int getfh(const char *, fhandle_t *); +int getfhat(int, char *, struct fhandle *, int); int getfsstat(struct statfs *, long, int); int getmntinfo(struct statfs **, int); int lgetfh(const char *, fhandle_t *); diff --git a/freebsd/sys/sys/mutex.h b/freebsd/sys/sys/mutex.h index e9c91f80..8d2f01ba 100644 --- a/freebsd/sys/sys/mutex.h +++ b/freebsd/sys/sys/mutex.h @@ -531,7 +531,7 @@ do { \ int _giantcnt = 0; \ WITNESS_SAVE_DECL(Giant); \ \ - if (mtx_owned(&Giant)) { \ + if (__predict_false(mtx_owned(&Giant))) { \ WITNESS_SAVE(&Giant.lock_object, Giant); \ for (_giantcnt = 0; mtx_owned(&Giant) && \ !SCHEDULER_STOPPED(); _giantcnt++) \ @@ -544,7 +544,7 @@ do { \ #define PARTIAL_PICKUP_GIANT() \ mtx_assert(&Giant, MA_NOTOWNED); \ - if (_giantcnt > 0) { \ + if (__predict_false(_giantcnt > 0)) { \ while (_giantcnt--) \ mtx_lock(&Giant); \ WITNESS_RESTORE(&Giant.lock_object, Giant); \ diff --git a/freebsd/sys/sys/priv.h b/freebsd/sys/sys/priv.h index 55453f5a..3027cbf5 100644 --- a/freebsd/sys/sys/priv.h +++ b/freebsd/sys/sys/priv.h @@ -533,10 +533,10 @@ struct thread; struct ucred; #ifndef __rtems__ int priv_check(struct thread *td, int priv); -int priv_check_cred(struct ucred *cred, int priv, int flags); +int priv_check_cred(struct ucred *cred, int priv); #else /* __rtems__ */ #define priv_check(td, priv) 0 -#define priv_check_cred(cred, priv, flags) 0 +#define priv_check_cred(cred, priv) 0 #endif /* __rtems__ */ #endif diff --git a/freebsd/sys/sys/proc.h b/freebsd/sys/sys/proc.h index 9868f9cf..6c352059 100644 --- a/freebsd/sys/sys/proc.h +++ b/freebsd/sys/sys/proc.h @@ -643,10 +643,10 @@ struct proc { struct ksiginfo *p_ksi; /* Locked by parent proc lock */ sigqueue_t p_sigqueue; /* (c) Sigs not delivered to a td. */ #define p_siglist p_sigqueue.sq_signals + pid_t p_oppid; /* (c + e) Real parent pid. */ /* The following fields are all zeroed upon creation in fork. */ -#define p_startzero p_oppid - pid_t p_oppid; /* (c + e) Save ppid in ptrace. XXX */ +#define p_startzero p_vmspace struct vmspace *p_vmspace; /* (b) Address space. */ u_int p_swtick; /* (c) Tick when swapped in or out. */ u_int p_cowgen; /* (c) Generation of COW pointers. */ @@ -691,6 +691,7 @@ struct proc { u_int p_magic; /* (b) Magic number. */ int p_osrel; /* (x) osreldate for the binary (from ELF note, if any) */ + uint32_t p_fctl0; /* (x) ABI feature control, ELF note */ char p_comm[MAXCOMLEN + 1]; /* (x) Process name. */ struct sysentvec *p_sysent; /* (b) Syscall dispatch info. */ struct pargs *p_args; /* (c) Process arguments. */ @@ -997,8 +998,11 @@ extern pid_t pid_max; #define THREAD_CAN_SLEEP() ((curthread)->td_no_sleeping == 0) #define PIDHASH(pid) (&pidhashtbl[(pid) & pidhash]) +#define PIDHASHLOCK(pid) (&pidhashtbl_lock[((pid) & pidhashlock)]) extern LIST_HEAD(pidhashhead, proc) *pidhashtbl; +extern struct sx *pidhashtbl_lock; extern u_long pidhash; +extern u_long pidhashlock; #define TIDHASH(tid) (&tidhashtbl[(tid) & tidhash]) extern LIST_HEAD(tidhashhead, thread) *tidhashtbl; extern u_long tidhash; @@ -1010,8 +1014,10 @@ extern u_long pgrphash; extern struct sx allproc_lock; extern int allproc_gen; +extern struct sx zombproc_lock; extern struct sx proctree_lock; extern struct mtx ppeers_lock; +extern struct mtx procid_lock; extern struct proc proc0; /* Process slot for swapper. */ extern struct thread0_storage thread0_st; /* Primary thread in proc0. */ #define thread0 (thread0_st.t0st_thread) @@ -1033,7 +1039,6 @@ extern struct uma_zone *proc_zone; struct proc *pfind(pid_t); /* Find process by id. */ struct proc *pfind_any(pid_t); /* Find (zombie) process by id. */ -struct proc *pfind_locked(pid_t pid); struct pgrp *pgfind(pid_t); /* Find process group by id. */ struct proc *zpfind(pid_t); /* Find zombie process by id. */ @@ -1081,6 +1086,7 @@ int enterthispgrp(struct proc *p, struct pgrp *pgrp); void faultin(struct proc *p); void fixjobc(struct proc *p, struct pgrp *pgrp, int entering); int fork1(struct thread *, struct fork_req *); +void fork_rfppwait(struct thread *); void fork_exit(void (*)(void *, struct trapframe *), void *, struct trapframe *); void fork_return(struct thread *, struct trapframe *); @@ -1111,11 +1117,12 @@ int proc_getargv(struct thread *td, struct proc *p, struct sbuf *sb); int proc_getauxv(struct thread *td, struct proc *p, struct sbuf *sb); int proc_getenvv(struct thread *td, struct proc *p, struct sbuf *sb); void procinit(void); +int proc_iterate(int (*cb)(struct proc *, void *), void *cbarg); void proc_linkup0(struct proc *p, struct thread *td); void proc_linkup(struct proc *p, struct thread *td); struct proc *proc_realparent(struct proc *child); void proc_reap(struct thread *td, struct proc *p, int *status, int options); -void proc_reparent(struct proc *child, struct proc *newparent); +void proc_reparent(struct proc *child, struct proc *newparent, bool set_oppid); void proc_set_traced(struct proc *p, bool stop); void proc_wkilled(struct proc *p); struct pstats *pstats_alloc(void); @@ -1234,6 +1241,15 @@ td_softdep_cleanup(struct thread *td) } #endif /* __rtems__ */ +#define PROC_ID_PID 0 +#define PROC_ID_GROUP 1 +#define PROC_ID_SESSION 2 +#define PROC_ID_REAP 3 + +void proc_id_set(int type, pid_t id); +void proc_id_set_cond(int type, pid_t id); +void proc_id_clear(int type, pid_t id); + #endif /* _KERNEL */ #endif /* !_SYS_PROC_H_ */ diff --git a/freebsd/sys/sys/racct.h b/freebsd/sys/sys/racct.h index 84de705f..17af3276 100644 --- a/freebsd/sys/sys/racct.h +++ b/freebsd/sys/sys/racct.h @@ -91,7 +91,7 @@ struct ucred; #define RACCT_DECAYING 0x20 extern int racct_types[]; -extern int racct_enable; +extern bool racct_enable; #define ASSERT_RACCT_ENABLED() KASSERT(racct_enable, \ ("%s called with !racct_enable", __func__)) @@ -164,12 +164,14 @@ extern struct mtx racct_lock; #define RACCT_UNLOCK() mtx_unlock(&racct_lock) #define RACCT_LOCK_ASSERT() mtx_assert(&racct_lock, MA_OWNED) +#define RACCT_ENABLED() __predict_false(racct_enable) + #define RACCT_PROC_LOCK(p) do { \ - if (__predict_false(racct_enable)) \ + if (RACCT_ENABLED()) \ PROC_LOCK(p); \ } while (0) #define RACCT_PROC_UNLOCK(p) do { \ - if (__predict_false(racct_enable)) \ + if (RACCT_ENABLED()) \ PROC_UNLOCK(p); \ } while (0) @@ -178,6 +180,7 @@ void racct_add_cred(struct ucred *cred, int resource, uint64_t amount); void racct_add_force(struct proc *p, int resource, uint64_t amount); void racct_add_buf(struct proc *p, const struct buf *bufp, int is_write); int racct_set(struct proc *p, int resource, uint64_t amount); +int racct_set_unlocked(struct proc *p, int resource, uint64_t amount); void racct_set_force(struct proc *p, int resource, uint64_t amount); void racct_sub(struct proc *p, int resource, uint64_t amount); void racct_sub_cred(struct ucred *cred, int resource, uint64_t amount); @@ -194,6 +197,7 @@ void racct_proc_exit(struct proc *p); void racct_proc_ucred_changed(struct proc *p, struct ucred *oldcred, struct ucred *newcred); void racct_move(struct racct *dest, struct racct *src); +void racct_proc_throttled(struct proc *p); void racct_proc_throttle(struct proc *p, int timeout); #else diff --git a/freebsd/sys/sys/refcount.h b/freebsd/sys/sys/refcount.h index 41713147..0cc4eb41 100644 --- a/freebsd/sys/sys/refcount.h +++ b/freebsd/sys/sys/refcount.h @@ -79,8 +79,6 @@ refcount_release(volatile u_int *count) /* * This functions returns non-zero if the refcount was * incremented. Else zero is returned. - * - * A temporary hack until refcount_* APIs are sorted out. */ static __inline __result_use_check int refcount_acquire_if_not_zero(volatile u_int *count) diff --git a/freebsd/sys/sys/resourcevar.h b/freebsd/sys/sys/resourcevar.h index 7c7e8458..c7576d2d 100644 --- a/freebsd/sys/sys/resourcevar.h +++ b/freebsd/sys/sys/resourcevar.h @@ -147,6 +147,19 @@ struct plimit *lim_alloc(void); void lim_copy(struct plimit *dst, struct plimit *src); rlim_t lim_cur(struct thread *td, int which); +#define lim_cur(td, which) ({ \ + rlim_t _rlim; \ + struct thread *_td = (td); \ + int _which = (which); \ + if (__builtin_constant_p(which) && which != RLIMIT_DATA && \ + which != RLIMIT_STACK && which != RLIMIT_VMEM) { \ + _rlim = td->td_limit->pl_rlimit[which].rlim_cur; \ + } else { \ + _rlim = lim_cur(_td, _which); \ + } \ + _rlim; \ +}) + rlim_t lim_cur_proc(struct proc *p, int which); void lim_fork(struct proc *p1, struct proc *p2); void lim_free(struct plimit *limp); diff --git a/freebsd/sys/sys/rman.h b/freebsd/sys/sys/rman.h index 9c2f4653..e955cd58 100644 --- a/freebsd/sys/sys/rman.h +++ b/freebsd/sys/sys/rman.h @@ -131,6 +131,7 @@ bus_space_tag_t rman_get_bustag(struct resource *); rman_res_t rman_get_end(struct resource *); device_t rman_get_device(struct resource *); u_int rman_get_flags(struct resource *); +void *rman_get_irq_cookie(struct resource *); void rman_get_mapping(struct resource *, struct resource_map *); int rman_get_rid(struct resource *); rman_res_t rman_get_size(struct resource *); @@ -155,6 +156,7 @@ void rman_set_bushandle(struct resource *_r, bus_space_handle_t _h); void rman_set_bustag(struct resource *_r, bus_space_tag_t _t); void rman_set_device(struct resource *_r, device_t _dev); void rman_set_end(struct resource *_r, rman_res_t _end); +void rman_set_irq_cookie(struct resource *_r, void *_c); void rman_set_mapping(struct resource *, struct resource_map *); void rman_set_rid(struct resource *_r, int _rid); void rman_set_start(struct resource *_r, rman_res_t _start); diff --git a/freebsd/sys/sys/sdt.h b/freebsd/sys/sys/sdt.h index 424a0e3a..fb5c3d67 100644 --- a/freebsd/sys/sys/sdt.h +++ b/freebsd/sys/sys/sdt.h @@ -90,6 +90,7 @@ extern volatile bool sdt_probes_enabled; #define SDT_PROVIDER_DECLARE(prov) #define SDT_PROBE_DEFINE(prov, mod, func, name) #define SDT_PROBE_DECLARE(prov, mod, func, name) +#define SDT_PROBES_ENABLED() 0 #define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) #define SDT_PROBE_ARGTYPE(prov, mod, func, name, num, type, xtype) @@ -164,8 +165,10 @@ SET_DECLARE(sdt_argtypes_set, struct sdt_argtype); #define SDT_PROBE_DECLARE(prov, mod, func, name) \ extern struct sdt_probe sdt_##prov##_##mod##_##func##_##name[1] +#define SDT_PROBES_ENABLED() __predict_false(sdt_probes_enabled) + #define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) do { \ - if (__predict_false(sdt_probes_enabled)) { \ + if (SDT_PROBES_ENABLED()) { \ if (__predict_false(sdt_##prov##_##mod##_##func##_##name->id)) \ (*sdt_probe_func)(sdt_##prov##_##mod##_##func##_##name->id, \ (uintptr_t) arg0, (uintptr_t) arg1, (uintptr_t) arg2, \ diff --git a/freebsd/sys/sys/sockbuf.h b/freebsd/sys/sys/sockbuf.h index fc287023..3b716283 100644 --- a/freebsd/sys/sys/sockbuf.h +++ b/freebsd/sys/sys/sockbuf.h @@ -165,8 +165,6 @@ void sbrelease_locked(struct sockbuf *sb, struct socket *so); int sbsetopt(struct socket *so, int cmd, u_long cc); int sbreserve_locked(struct sockbuf *sb, u_long cc, struct socket *so, struct thread *td); -struct mbuf * - sbsndptr(struct sockbuf *sb, u_int off, u_int len, u_int *moff); void sbsndptr_adv(struct sockbuf *sb, struct mbuf *mb, u_int len); struct mbuf * sbsndptr_noadv(struct sockbuf *sb, u_int off, u_int *moff); diff --git a/freebsd/sys/sys/sx.h b/freebsd/sys/sys/sx.h index 10cfb10a..9e0da83a 100644 --- a/freebsd/sys/sys/sx.h +++ b/freebsd/sys/sys/sx.h @@ -313,7 +313,6 @@ int sx_xlocked(struct sx *sx); #define SX_NOPROFILE 0x02 #define SX_NOWITNESS 0x04 #define SX_QUIET 0x08 -#define SX_NOADAPTIVE 0x10 #define SX_RECURSE 0x20 #define SX_NEW 0x40 diff --git a/freebsd/sys/sys/sysctl.h b/freebsd/sys/sys/sysctl.h index e270a4b2..cf5a5581 100644 --- a/freebsd/sys/sys/sysctl.h +++ b/freebsd/sys/sys/sysctl.h @@ -165,11 +165,7 @@ struct sysctl_req { size_t oldlen; size_t oldidx; int (*oldfunc)(struct sysctl_req *, const void *, size_t); -#ifndef __rtems__ - void *newptr; -#else /* __rtems__ */ - const void *newptr; -#endif /* __rtems__ */ + const void *newptr; size_t newlen; size_t newidx; int (*newfunc)(struct sysctl_req *, void *, size_t); @@ -1135,11 +1131,7 @@ int kernel_sysctlbyname(struct thread *td, char *name, void *old, #endif /* __rtems__ */ int flags); int userland_sysctl(struct thread *td, int *name, u_int namelen, void *old, -#ifndef __rtems__ - size_t *oldlenp, int inkernel, void *new, size_t newlen, -#else /* __rtems__ */ - size_t *oldlenp, int inkernel, const void *newp, size_t newlen, -#endif /* __rtems__ */ + size_t *oldlenp, int inkernel, const void *new, size_t newlen, size_t *retval, int flags); int sysctl_find_oid(int *name, u_int namelen, struct sysctl_oid **noid, int *nindx, struct sysctl_req *req); diff --git a/freebsd/sys/sys/sysproto.h b/freebsd/sys/sys/sysproto.h index a39f5cd3..faa5a62f 100644 --- a/freebsd/sys/sys/sysproto.h +++ b/freebsd/sys/sys/sysproto.h @@ -254,7 +254,7 @@ struct umask_args { struct chroot_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; }; -struct getpagesize_args { +struct ogetpagesize_args { register_t dummy; }; struct msync_args { @@ -1817,6 +1817,26 @@ struct getrandom_args { char buflen_l_[PADL_(size_t)]; size_t buflen; char buflen_r_[PADR_(size_t)]; char flags_l_[PADL_(unsigned int)]; unsigned int flags; char flags_r_[PADR_(unsigned int)]; }; +struct getfhat_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char fhp_l_[PADL_(struct fhandle *)]; struct fhandle * fhp; char fhp_r_[PADR_(struct fhandle *)]; + char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; +}; +struct fhlink_args { + char fhp_l_[PADL_(struct fhandle *)]; struct fhandle * fhp; char fhp_r_[PADR_(struct fhandle *)]; + char to_l_[PADL_(const char *)]; const char * to; char to_r_[PADR_(const char *)]; +}; +struct fhlinkat_args { + char fhp_l_[PADL_(struct fhandle *)]; struct fhandle * fhp; char fhp_r_[PADR_(struct fhandle *)]; + char tofd_l_[PADL_(int)]; int tofd; char tofd_r_[PADR_(int)]; + char to_l_[PADL_(const char *)]; const char * to; char to_r_[PADR_(const char *)]; +}; +struct fhreadlink_args { + char fhp_l_[PADL_(struct fhandle *)]; struct fhandle * fhp; char fhp_r_[PADR_(struct fhandle *)]; + char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; + char bufsize_l_[PADL_(size_t)]; size_t bufsize; char bufsize_r_[PADR_(size_t)]; +}; int nosys(struct thread *, struct nosys_args *); void sys_sys_exit(struct thread *, struct sys_exit_args *); int sys_fork(struct thread *, struct fork_args *); @@ -2197,6 +2217,10 @@ int sys_kevent(struct thread *, struct kevent_args *); int sys_cpuset_getdomain(struct thread *, struct cpuset_getdomain_args *); int sys_cpuset_setdomain(struct thread *, struct cpuset_setdomain_args *); int sys_getrandom(struct thread *, struct getrandom_args *); +int sys_getfhat(struct thread *, struct getfhat_args *); +int sys_fhlink(struct thread *, struct fhlink_args *); +int sys_fhlinkat(struct thread *, struct fhlinkat_args *); +int sys_fhreadlink(struct thread *, struct fhreadlink_args *); #ifdef COMPAT_43 @@ -2230,7 +2254,7 @@ struct ofstat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char sb_l_[PADL_(struct ostat *)]; struct ostat * sb; char sb_r_[PADR_(struct ostat *)]; }; -struct getkerninfo_args { +struct ogetkerninfo_args { char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)]; char where_l_[PADL_(char *)]; char * where; char where_r_[PADR_(char *)]; char size_l_[PADL_(size_t *)]; size_t * size; char size_r_[PADR_(size_t *)]; @@ -2244,14 +2268,19 @@ struct ommap_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char pos_l_[PADL_(long)]; long pos; char pos_r_[PADR_(long)]; }; -struct gethostname_args { +struct ogethostname_args { char hostname_l_[PADL_(char *)]; char * hostname; char hostname_r_[PADR_(char *)]; char len_l_[PADL_(u_int)]; u_int len; char len_r_[PADR_(u_int)]; }; -struct sethostname_args { +struct osethostname_args { char hostname_l_[PADL_(char *)]; char * hostname; char hostname_r_[PADR_(char *)]; char len_l_[PADL_(u_int)]; u_int len; char len_r_[PADR_(u_int)]; }; +struct oaccept_args { + char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; + char name_l_[PADL_(struct sockaddr *)]; struct sockaddr * name; char name_r_[PADR_(struct sockaddr *)]; + char anamelen_l_[PADL_(int *)]; int * anamelen; char anamelen_r_[PADR_(int *)]; +}; struct osend_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)]; @@ -2337,13 +2366,13 @@ int osigaction(struct thread *, struct osigaction_args *); int osigprocmask(struct thread *, struct osigprocmask_args *); int osigpending(struct thread *, struct osigpending_args *); int ofstat(struct thread *, struct ofstat_args *); -int ogetkerninfo(struct thread *, struct getkerninfo_args *); -int ogetpagesize(struct thread *, struct getpagesize_args *); +int ogetkerninfo(struct thread *, struct ogetkerninfo_args *); +int ogetpagesize(struct thread *, struct ogetpagesize_args *); int ommap(struct thread *, struct ommap_args *); int owait(struct thread *, struct owait_args *); -int ogethostname(struct thread *, struct gethostname_args *); -int osethostname(struct thread *, struct sethostname_args *); -int oaccept(struct thread *, struct accept_args *); +int ogethostname(struct thread *, struct ogethostname_args *); +int osethostname(struct thread *, struct osethostname_args *); +int oaccept(struct thread *, struct oaccept_args *); int osend(struct thread *, struct osend_args *); int orecv(struct thread *, struct orecv_args *); int osigreturn(struct thread *, struct osigreturn_args *); @@ -3094,6 +3123,10 @@ int freebsd11_mknodat(struct thread *, struct freebsd11_mknodat_args *); #define SYS_AUE_cpuset_getdomain AUE_NULL #define SYS_AUE_cpuset_setdomain AUE_NULL #define SYS_AUE_getrandom AUE_NULL +#define SYS_AUE_getfhat AUE_NULL +#define SYS_AUE_fhlink AUE_NULL +#define SYS_AUE_fhlinkat AUE_NULL +#define SYS_AUE_fhreadlink AUE_NULL #endif /* __rtems__ */ #undef PAD_ diff --git a/freebsd/sys/sys/systm.h b/freebsd/sys/sys/systm.h index d74a1e4b..1aa57670 100644 --- a/freebsd/sys/sys/systm.h +++ b/freebsd/sys/sys/systm.h @@ -654,6 +654,32 @@ int alloc_unr_specific(struct unrhdr *uh, u_int item); int alloc_unrl(struct unrhdr *uh); void free_unr(struct unrhdr *uh, u_int item); +#ifndef __LP64__ +#define UNR64_LOCKED +#endif + +struct unrhdr64 { + uint64_t counter; +}; + +static __inline void +new_unrhdr64(struct unrhdr64 *unr64, uint64_t low) +{ + + unr64->counter = low; +} + +#ifdef UNR64_LOCKED +uint64_t alloc_unr64(struct unrhdr64 *); +#else +static __inline uint64_t +alloc_unr64(struct unrhdr64 *unr64) +{ + + return (atomic_fetchadd_64(&unr64->counter, 1)); +} +#endif + void intr_prof_stack_use(struct thread *td, struct trapframe *frame); void counted_warning(unsigned *counter, const char *msg); diff --git a/freebsd/sys/sys/taskqueue.h b/freebsd/sys/sys/taskqueue.h index 7ba9e268..4af1e0a3 100644 --- a/freebsd/sys/sys/taskqueue.h +++ b/freebsd/sys/sys/taskqueue.h @@ -93,6 +93,7 @@ void taskqueue_drain(struct taskqueue *queue, struct task *task); void taskqueue_drain_timeout(struct taskqueue *queue, struct timeout_task *timeout_task); void taskqueue_drain_all(struct taskqueue *queue); +void taskqueue_quiesce(struct taskqueue *queue); void taskqueue_free(struct taskqueue *queue); void taskqueue_run(struct taskqueue *queue); void taskqueue_block(struct taskqueue *queue); diff --git a/freebsd/sys/sys/user.h b/freebsd/sys/sys/user.h index 1218deec..80716460 100644 --- a/freebsd/sys/sys/user.h +++ b/freebsd/sys/sys/user.h @@ -264,6 +264,7 @@ struct user { #define KF_TYPE_SEM 9 #define KF_TYPE_PTS 10 #define KF_TYPE_PROCDESC 11 +#define KF_TYPE_DEV 12 #define KF_TYPE_UNKNOWN 255 #define KF_VTYPE_VNON 0 |