diff options
author | Renato Botelho <renato@netgate.com> | 2016-01-13 17:56:30 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-01-13 17:56:30 -0200 |
commit | 3e0bf52f358eb969d165c4b1e54942ee94cf2c8d (patch) | |
tree | 440bb9907871a5bc578d65b32f0c4aa339096175 /sys/sys | |
parent | 4b4ac714f11471e43f18410bcc86da8f9dc3b88c (diff) | |
parent | e357bdb742b2696dcb81404917b6247f9e840232 (diff) | |
download | FreeBSD-src-3e0bf52f358eb969d165c4b1e54942ee94cf2c8d.zip FreeBSD-src-3e0bf52f358eb969d165c4b1e54942ee94cf2c8d.tar.gz |
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'sys/sys')
-rw-r--r-- | sys/sys/capsicum.h | 4 | ||||
-rw-r--r-- | sys/sys/file.h | 1 | ||||
-rw-r--r-- | sys/sys/param.h | 2 | ||||
-rw-r--r-- | sys/sys/proc.h | 13 | ||||
-rw-r--r-- | sys/sys/reboot.h | 1 | ||||
-rw-r--r-- | sys/sys/stat.h | 8 | ||||
-rw-r--r-- | sys/sys/syscall.h | 6 | ||||
-rw-r--r-- | sys/sys/syscall.mk | 6 | ||||
-rw-r--r-- | sys/sys/syscallsubr.h | 22 | ||||
-rw-r--r-- | sys/sys/sysent.h | 1 | ||||
-rw-r--r-- | sys/sys/sysproto.h | 16 | ||||
-rw-r--r-- | sys/sys/vnode.h | 1 |
12 files changed, 73 insertions, 8 deletions
diff --git a/sys/sys/capsicum.h b/sys/sys/capsicum.h index 6ccb424..54b1c33 100644 --- a/sys/sys/capsicum.h +++ b/sys/sys/capsicum.h @@ -146,9 +146,9 @@ #define CAP_FSTATAT (CAP_FSTAT | CAP_LOOKUP) /* Allows for fstatfs(2). */ #define CAP_FSTATFS CAPRIGHT(0, 0x0000000000100000ULL) -/* Allows for futimes(2). */ +/* Allows for futimens(2) and futimes(2). */ #define CAP_FUTIMES CAPRIGHT(0, 0x0000000000200000ULL) -/* Allows for futimes(2) and futimesat(2). */ +/* Allows for futimens(2), futimes(2), futimesat(2) and utimensat(2). */ #define CAP_FUTIMESAT (CAP_FUTIMES | CAP_LOOKUP) /* Allows for linkat(2) and renameat(2) (destination directory descriptor). */ #define CAP_LINKAT (CAP_LOOKUP | 0x0000000000400000ULL) diff --git a/sys/sys/file.h b/sys/sys/file.h index e3bdbe9..a8112be 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -65,6 +65,7 @@ struct socket; #define DTYPE_PTS 10 /* pseudo teletype master device */ #define DTYPE_DEV 11 /* Device specific fd type */ #define DTYPE_PROCDESC 12 /* process descriptor */ +#define DTYPE_LINUXEFD 13 /* emulation eventfd type */ #ifdef _KERNEL diff --git a/sys/sys/param.h b/sys/sys/param.h index e58c77e..1fd1313 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1002505 /* Master, propagated to newvers */ +#define __FreeBSD_version 1002508 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 5b441bc..119349a 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -323,6 +323,7 @@ struct thread { void *td_su; /* (k) FFS SU private */ u_int td_dbg_sc_code; /* (c) Syscall code to debugger. */ u_int td_dbg_sc_narg; /* (c) Syscall arg count to debugger.*/ + void *td_emuldata; /* Emulator state data */ }; struct mtx *thread_lock_block(struct thread *); @@ -616,6 +617,18 @@ struct proc { #define PROC_SUNLOCK(p) mtx_unlock_spin(&(p)->p_slock) #define PROC_SLOCK_ASSERT(p, type) mtx_assert(&(p)->p_slock, (type)) +#define PROC_STATLOCK(p) mtx_lock_spin(&(p)->p_slock) +#define PROC_STATUNLOCK(p) mtx_unlock_spin(&(p)->p_slock) +#define PROC_STATLOCK_ASSERT(p, type) mtx_assert(&(p)->p_slock, (type)) + +#define PROC_ITIMLOCK(p) mtx_lock_spin(&(p)->p_slock) +#define PROC_ITIMUNLOCK(p) mtx_unlock_spin(&(p)->p_slock) +#define PROC_ITIMLOCK_ASSERT(p, type) mtx_assert(&(p)->p_slock, (type)) + +#define PROC_PROFLOCK(p) mtx_lock_spin(&(p)->p_slock) +#define PROC_PROFUNLOCK(p) mtx_unlock_spin(&(p)->p_slock) +#define PROC_PROFLOCK_ASSERT(p, type) mtx_assert(&(p)->p_slock, (type)) + /* These flags are kept in p_flag. */ #define P_ADVLOCK 0x00001 /* Process may hold a POSIX advisory lock. */ #define P_CONTROLT 0x00002 /* Has a controlling terminal. */ diff --git a/sys/sys/reboot.h b/sys/sys/reboot.h index 6b8e25e..ebe688e 100644 --- a/sys/sys/reboot.h +++ b/sys/sys/reboot.h @@ -59,6 +59,7 @@ #define RB_RESERVED1 0x40000 /* reserved for internal use of boot blocks */ #define RB_RESERVED2 0x80000 /* reserved for internal use of boot blocks */ #define RB_PAUSE 0x100000 /* pause after each output line during probe */ +#define RB_REROOT 0x200000 /* unmount the rootfs and mount it again */ #define RB_MULTIPLE 0x20000000 /* use multiple consoles */ #define RB_BOOTINFO 0x80000000 /* have `struct bootinfo *' arg */ diff --git a/sys/sys/stat.h b/sys/sys/stat.h index 0f3284f..e6ff5a6 100644 --- a/sys/sys/stat.h +++ b/sys/sys/stat.h @@ -307,6 +307,11 @@ struct nstat { #endif /* __BSD_VISIBLE */ +#if __POSIX_VISIBLE >= 200809 +#define UTIME_NOW -1 +#define UTIME_OMIT -2 +#endif + #ifndef _KERNEL __BEGIN_DECLS #if __BSD_VISIBLE @@ -322,6 +327,9 @@ int fchmod(int, mode_t); #endif #if __POSIX_VISIBLE >= 200809 int fchmodat(int, const char *, mode_t, int); +int futimens(int fd, const struct timespec times[2]); +int utimensat(int fd, const char *path, const struct timespec times[2], + int flag); #endif int fstat(int, struct stat *); #if __BSD_VISIBLE diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index 80f0941..19b76dd 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/kern/syscalls.master 276955 2015-01-11 07:02:03Z dchagin + * created from FreeBSD: stable/10/sys/kern/syscalls.master 293474 2016-01-09 14:20:23Z dchagin */ #define SYS_syscall 0 @@ -465,4 +465,6 @@ #define SYS_aio_mlock 543 #define SYS_procctl 544 #define SYS_ppoll 545 -#define SYS_MAXSYSCALL 546 +#define SYS_futimens 546 +#define SYS_utimensat 547 +#define SYS_MAXSYSCALL 548 diff --git a/sys/sys/syscall.mk b/sys/sys/syscall.mk index 30014a1..334c591 100644 --- a/sys/sys/syscall.mk +++ b/sys/sys/syscall.mk @@ -1,7 +1,7 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: stable/10/sys/kern/syscalls.master 276955 2015-01-11 07:02:03Z dchagin +# created from FreeBSD: stable/10/sys/kern/syscalls.master 293474 2016-01-09 14:20:23Z dchagin MIASM = \ syscall.o \ exit.o \ @@ -412,4 +412,6 @@ MIASM = \ pipe2.o \ aio_mlock.o \ procctl.o \ - ppoll.o + ppoll.o \ + futimens.o \ + utimensat.o diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index f59bbb9..e038c98 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -55,6 +55,7 @@ struct sendfile_args; struct sockaddr; struct stat; struct thr_param; +struct sched_param; struct __wrusage; int kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, @@ -106,6 +107,8 @@ int kern_fstatfs(struct thread *td, int fd, struct statfs *buf); int kern_ftruncate(struct thread *td, int fd, off_t length); int kern_futimes(struct thread *td, int fd, struct timeval *tptr, enum uio_seg tptrseg); +int kern_futimens(struct thread *td, int fd, struct timespec *tptr, + enum uio_seg tptrseg); int kern_getdirentries(struct thread *td, int fd, char *buf, u_int count, long *basep, ssize_t *residp, enum uio_seg bufseg); int kern_getfsstat(struct thread *td, struct statfs **buf, size_t bufsize, @@ -125,6 +128,10 @@ 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_kevent(struct thread *td, int fd, int nchanges, int nevents, struct kevent_copyops *k_ops, const struct timespec *timeout); +int kern_kevent_fp(struct thread *td, struct file *fp, int nchanges, + int nevents, struct kevent_copyops *k_ops, + const struct timespec *timeout); +int kern_kqueue(struct thread *td, int flags); int kern_kldload(struct thread *td, const char *file, int *fileid); int kern_kldstat(struct thread *td, int fileid, struct kld_file_stat *stat); int kern_kldunload(struct thread *td, int fileid, int flags); @@ -193,8 +200,18 @@ int kern_renameat(struct thread *td, int oldfd, char *old, int newfd, int kern_rmdir(struct thread *td, char *path, enum uio_seg pathseg); int kern_rmdirat(struct thread *td, int fd, char *path, enum uio_seg pathseg); +int kern_sched_getparam(struct thread *td, struct thread *targettd, + struct sched_param *param); +int kern_sched_getscheduler(struct thread *td, struct thread *targettd, + int *policy); +int kern_sched_setparam(struct thread *td, struct thread *targettd, + struct sched_param *param); +int kern_sched_setscheduler(struct thread *td, struct thread *targettd, + int policy, struct sched_param *param); int kern_sched_rr_get_interval(struct thread *td, pid_t pid, struct timespec *ts); +int kern_sched_rr_get_interval_td(struct thread *td, struct thread *targettd, + struct timespec *ts); int kern_semctl(struct thread *td, int semid, int semnum, int cmd, union semun *arg, register_t *rval); int kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou, @@ -244,6 +261,8 @@ int kern_ktimer_settime(struct thread *td, int timer_id, int flags, int kern_ktimer_gettime(struct thread *td, int timer_id, struct itimerspec *val); int kern_ktimer_getoverrun(struct thread *td, int timer_id); +int kern_thr_alloc(struct proc *, int pages, struct thread **); +int kern_thr_exit(struct thread *td); int kern_thr_new(struct thread *td, struct thr_param *param); int kern_thr_suspend(struct thread *td, struct timespec *tsp); int kern_truncate(struct thread *td, char *path, enum uio_seg pathseg, @@ -255,6 +274,9 @@ int kern_utimes(struct thread *td, char *path, enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg); int kern_utimesat(struct thread *td, int fd, char *path, enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg); +int kern_utimensat(struct thread *td, int fd, char *path, + enum uio_seg pathseg, struct timespec *tptr, enum uio_seg tptrseg, + int follow); int kern_wait(struct thread *td, pid_t pid, int *status, int options, struct rusage *rup); int kern_wait6(struct thread *td, enum idtype idtype, id_t id, int *status, diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h index c49db41..a93d552 100644 --- a/sys/sys/sysent.h +++ b/sys/sys/sysent.h @@ -130,6 +130,7 @@ struct sysentvec { uint32_t sv_timekeep_gen; void *sv_shared_page_obj; void (*sv_schedtail)(struct thread *); + void (*sv_thread_detach)(struct thread *); }; #define SV_ILP32 0x000100 diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index ab1a5b0..d8c84f7 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/kern/syscalls.master 276955 2015-01-11 07:02:03Z dchagin + * created from FreeBSD: stable/10/sys/kern/syscalls.master 293474 2016-01-09 14:20:23Z dchagin */ #ifndef _SYS_SYSPROTO_H_ @@ -1825,6 +1825,16 @@ struct ppoll_args { char ts_l_[PADL_(const struct timespec *)]; const struct timespec * ts; char ts_r_[PADR_(const struct timespec *)]; char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; }; +struct futimens_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char times_l_[PADL_(struct timespec *)]; struct timespec * times; char times_r_[PADR_(struct timespec *)]; +}; +struct utimensat_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 times_l_[PADL_(struct timespec *)]; struct timespec * times; char times_r_[PADR_(struct timespec *)]; + char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; +}; 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 *); @@ -2219,6 +2229,8 @@ int sys_pipe2(struct thread *, struct pipe2_args *); int sys_aio_mlock(struct thread *, struct aio_mlock_args *); int sys_procctl(struct thread *, struct procctl_args *); int sys_ppoll(struct thread *, struct ppoll_args *); +int sys_futimens(struct thread *, struct futimens_args *); +int sys_utimensat(struct thread *, struct utimensat_args *); #ifdef COMPAT_43 @@ -2927,6 +2939,8 @@ int freebsd7_shmctl(struct thread *, struct freebsd7_shmctl_args *); #define SYS_AUE_aio_mlock AUE_NULL #define SYS_AUE_procctl AUE_NULL #define SYS_AUE_ppoll AUE_POLL +#define SYS_AUE_futimens AUE_FUTIMES +#define SYS_AUE_utimensat AUE_FUTIMESAT #undef PAD_ #undef PADL_ diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index e738212..3badf34 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -417,6 +417,7 @@ extern int vttoif_tab[]; * Global vnode data. */ extern struct vnode *rootvnode; /* root (i.e. "/") vnode */ +extern struct mount *rootdevmp; /* "/dev" mount */ extern int async_io_version; /* 0 or POSIX version of AIO i'face */ extern int desiredvnodes; /* number of vnodes desired */ extern struct uma_zone *namei_zone; |