[Midnightbsd-cvs] src [12331] trunk/sys/sys: sync with FreeBSD 11-stable
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Feb 8 15:00:10 EST 2020
Revision: 12331
http://svnweb.midnightbsd.org/src/?rev=12331
Author: laffer1
Date: 2020-02-08 15:00:09 -0500 (Sat, 08 Feb 2020)
Log Message:
-----------
sync with FreeBSD 11-stable
Modified Paths:
--------------
trunk/sys/sys/tty.h
trunk/sys/sys/ttycom.h
trunk/sys/sys/ttydefaults.h
trunk/sys/sys/ttydisc.h
trunk/sys/sys/ttyqueue.h
trunk/sys/sys/turnstile.h
trunk/sys/sys/types.h
trunk/sys/sys/ucontext.h
trunk/sys/sys/ucred.h
Modified: trunk/sys/sys/tty.h
===================================================================
--- trunk/sys/sys/tty.h 2020-02-08 19:57:06 UTC (rev 12330)
+++ trunk/sys/sys/tty.h 2020-02-08 20:00:09 UTC (rev 12331)
@@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: stable/10/sys/sys/tty.h 271773 2014-09-18 14:44:47Z grehan $
+ * $FreeBSD: stable/11/sys/sys/tty.h 331722 2018-03-29 02:50:57Z eadler $
*/
#ifndef _SYS_TTY_H_
@@ -63,6 +63,7 @@
struct mtx *t_mtx; /* TTY lock. */
struct mtx t_mtxobj; /* Per-TTY lock (when not borrowing). */
TAILQ_ENTRY(tty) t_list; /* (l) TTY list entry. */
+ int t_drainwait; /* (t) TIOCDRAIN timeout seconds. */
unsigned int t_flags; /* (t) Terminal option flags. */
/* Keep flags in sync with db_show_tty and pstat(8). */
#define TF_NOPREFIX 0x00001 /* Don't prepend "tty" to device name. */
@@ -172,11 +173,11 @@
#define tty_getlock(tp) ((tp)->t_mtx)
/* Device node creation. */
-void tty_makedev(struct tty *tp, struct ucred *cred, const char *fmt, ...)
- __printflike(3, 4);
int tty_makedevf(struct tty *tp, struct ucred *cred, int flags,
const char *fmt, ...) __printflike(4, 5);
#define TTYMK_CLONING 0x1
+#define tty_makedev(tp, cred, fmt, ...) \
+ (void )tty_makedevf((tp), (cred), 0, (fmt), ## __VA_ARGS__)
#define tty_makealias(tp,fmt,...) \
make_dev_alias((tp)->t_dev, fmt, ## __VA_ARGS__)
Modified: trunk/sys/sys/ttycom.h
===================================================================
--- trunk/sys/sys/ttycom.h 2020-02-08 19:57:06 UTC (rev 12330)
+++ trunk/sys/sys/ttycom.h 2020-02-08 20:00:09 UTC (rev 12331)
@@ -33,7 +33,7 @@
* SUCH DAMAGE.
*
* @(#)ttycom.h 8.1 (Berkeley) 3/28/94
- * $FreeBSD: stable/10/sys/sys/ttycom.h 231095 2012-02-06 18:15:46Z ed $
+ * $FreeBSD: stable/11/sys/sys/ttycom.h 331722 2018-03-29 02:50:57Z eadler $
*/
#ifndef _SYS_TTYCOM_H_
Modified: trunk/sys/sys/ttydefaults.h
===================================================================
--- trunk/sys/sys/ttydefaults.h 2020-02-08 19:57:06 UTC (rev 12330)
+++ trunk/sys/sys/ttydefaults.h 2020-02-08 20:00:09 UTC (rev 12331)
@@ -33,7 +33,7 @@
* SUCH DAMAGE.
*
* @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94
- * $FreeBSD: stable/10/sys/sys/ttydefaults.h 249311 2013-04-09 16:16:34Z ed $
+ * $FreeBSD: stable/11/sys/sys/ttydefaults.h 331722 2018-03-29 02:50:57Z eadler $
*/
/*
Modified: trunk/sys/sys/ttydisc.h
===================================================================
--- trunk/sys/sys/ttydisc.h 2020-02-08 19:57:06 UTC (rev 12330)
+++ trunk/sys/sys/ttydisc.h 2020-02-08 20:00:09 UTC (rev 12331)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2008 Ed Schouten <ed at FreeBSD.org>
* All rights reserved.
@@ -26,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/11/sys/sys/ttydisc.h 331722 2018-03-29 02:50:57Z eadler $
*/
#ifndef _SYS_TTYDISC_H_
Modified: trunk/sys/sys/ttyqueue.h
===================================================================
--- trunk/sys/sys/ttyqueue.h 2020-02-08 19:57:06 UTC (rev 12330)
+++ trunk/sys/sys/ttyqueue.h 2020-02-08 20:00:09 UTC (rev 12331)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2008 Ed Schouten <ed at FreeBSD.org>
* All rights reserved.
@@ -26,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/11/sys/sys/ttyqueue.h 331722 2018-03-29 02:50:57Z eadler $
*/
#ifndef _SYS_TTYQUEUE_H_
@@ -69,7 +70,7 @@
#ifdef _KERNEL
/* Input queue handling routines. */
-void ttyinq_setsize(struct ttyinq *ti, struct tty *tp, size_t len);
+int ttyinq_setsize(struct ttyinq *ti, struct tty *tp, size_t len);
void ttyinq_free(struct ttyinq *ti);
int ttyinq_read_uio(struct ttyinq *ti, struct tty *tp, struct uio *uio,
size_t readlen, size_t flushlen);
@@ -136,7 +137,7 @@
/* Output queue handling routines. */
void ttyoutq_flush(struct ttyoutq *to);
-void ttyoutq_setsize(struct ttyoutq *to, struct tty *tp, size_t len);
+int ttyoutq_setsize(struct ttyoutq *to, struct tty *tp, size_t len);
void ttyoutq_free(struct ttyoutq *to);
size_t ttyoutq_read(struct ttyoutq *to, void *buf, size_t len);
int ttyoutq_read_uio(struct ttyoutq *to, struct tty *tp, struct uio *uio);
Modified: trunk/sys/sys/turnstile.h
===================================================================
--- trunk/sys/sys/turnstile.h 2020-02-08 19:57:06 UTC (rev 12330)
+++ trunk/sys/sys/turnstile.h 2020-02-08 20:00:09 UTC (rev 12331)
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: stable/10/sys/sys/turnstile.h 262192 2014-02-18 20:27:17Z jhb $
+ * $FreeBSD: stable/11/sys/sys/turnstile.h 331722 2018-03-29 02:50:57Z eadler $
*/
#ifndef _SYS_TURNSTILE_H_
@@ -34,7 +34,7 @@
* Turnstile interface. Non-sleepable locks use a turnstile for the
* queue of threads blocked on them when they are contested. Each
* turnstile contains two sub-queues: one for threads waiting for a
- * shared, or eread, lock, and one for threads waiting for an
+ * shared, or read, lock, and one for threads waiting for an
* exclusive, or write, lock.
*
* A thread calls turnstile_chain_lock() to lock the turnstile chain
Modified: trunk/sys/sys/types.h
===================================================================
--- trunk/sys/sys/types.h 2020-02-08 19:57:06 UTC (rev 12330)
+++ trunk/sys/sys/types.h 2020-02-08 20:00:09 UTC (rev 12331)
@@ -33,7 +33,7 @@
* SUCH DAMAGE.
*
* @(#)types.h 8.6 (Berkeley) 2/19/95
- * $FreeBSD: stable/10/sys/sys/types.h 289107 2015-10-10 05:50:42Z kib $
+ * $FreeBSD: stable/11/sys/sys/types.h 331722 2018-03-29 02:50:57Z eadler $
*/
#ifndef _SYS_TYPES_H_
@@ -175,6 +175,11 @@
#define _OFF_T_DECLARED
#endif
+#ifndef _OFF64_T_DECLARED
+typedef __off64_t off64_t; /* file offset (alias) */
+#define _OFF64_T_DECLARED
+#endif
+
#ifndef _PID_T_DECLARED
typedef __pid_t pid_t; /* process id */
#define _PID_T_DECLARED
@@ -233,6 +238,11 @@
#define _USECONDS_T_DECLARED
#endif
+#ifndef _CAP_IOCTL_T_DECLARED
+#define _CAP_IOCTL_T_DECLARED
+typedef unsigned long cap_ioctl_t;
+#endif
+
#ifndef _CAP_RIGHTS_T_DECLARED
#define _CAP_RIGHTS_T_DECLARED
struct cap_rights;
@@ -241,11 +251,13 @@
#endif
typedef __vm_offset_t vm_offset_t;
-typedef __vm_ooffset_t vm_ooffset_t;
+typedef __int64_t vm_ooffset_t;
typedef __vm_paddr_t vm_paddr_t;
-typedef __vm_pindex_t vm_pindex_t;
+typedef __uint64_t vm_pindex_t;
typedef __vm_size_t vm_size_t;
+typedef __rman_res_t rman_res_t;
+
#ifdef _KERNEL
typedef int boolean_t;
typedef struct device *device_t;
Modified: trunk/sys/sys/ucontext.h
===================================================================
--- trunk/sys/sys/ucontext.h 2020-02-08 19:57:06 UTC (rev 12330)
+++ trunk/sys/sys/ucontext.h 2020-02-08 20:00:09 UTC (rev 12331)
@@ -26,7 +26,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: stable/10/sys/sys/ucontext.h 278347 2015-02-07 08:47:15Z kib $
+ * $FreeBSD: stable/11/sys/sys/ucontext.h 331722 2018-03-29 02:50:57Z eadler $
*/
#ifndef _SYS_UCONTEXT_H_
@@ -34,25 +34,9 @@
#include <sys/signal.h>
#include <machine/ucontext.h>
+#include <sys/_ucontext.h>
-typedef struct __ucontext {
- /*
- * Keep the order of the first two fields. Also,
- * keep them the first two fields in the structure.
- * This way we can have a union with struct
- * sigcontext and ucontext_t. This allows us to
- * support them both at the same time.
- * note: the union is not defined, though.
- */
- sigset_t uc_sigmask;
- mcontext_t uc_mcontext;
-
- struct __ucontext *uc_link;
- stack_t uc_stack;
- int uc_flags;
#define UCF_SWAPPED 0x00000001 /* Used by swapcontext(3). */
- int __spare__[4];
-} ucontext_t;
#if defined(_KERNEL) && defined(COMPAT_FREEBSD4)
#if defined(__i386__)
Modified: trunk/sys/sys/ucred.h
===================================================================
--- trunk/sys/sys/ucred.h 2020-02-08 19:57:06 UTC (rev 12330)
+++ trunk/sys/sys/ucred.h 2020-02-08 20:00:09 UTC (rev 12331)
@@ -28,7 +28,7 @@
* SUCH DAMAGE.
*
* @(#)ucred.h 8.4 (Berkeley) 1/9/95
- * $FreeBSD: stable/10/sys/sys/ucred.h 303846 2016-08-08 18:31:28Z bdrewery $
+ * $FreeBSD: stable/11/sys/sys/ucred.h 331722 2018-03-29 02:50:57Z eadler $
*/
#ifndef _SYS_UCRED_H_
@@ -38,6 +38,8 @@
struct loginclass;
+#define XU_NGROUPS 16
+
/*
* Credentials.
*
@@ -65,13 +67,12 @@
struct auditinfo_addr cr_audit; /* Audit properties. */
gid_t *cr_groups; /* groups */
int cr_agroups; /* Available groups */
+ gid_t cr_smallgroups[XU_NGROUPS]; /* storage for small groups */
};
#define NOCRED ((struct ucred *)0) /* no credential available */
#define FSCRED ((struct ucred *)-1) /* filesystem credential */
#endif /* _KERNEL || _WANT_UCRED */
-#define XU_NGROUPS 16
-
/*
* Flags for cr_flags.
*/
@@ -106,13 +107,11 @@
struct ucred *crcopysafe(struct proc *p, struct ucred *cr);
struct ucred *crdup(struct ucred *cr);
void crextend(struct ucred *cr, int n);
-void cred_update_thread(struct thread *td);
void proc_set_cred_init(struct proc *p, struct ucred *cr);
struct ucred *proc_set_cred(struct proc *p, struct ucred *cr);
void crfree(struct ucred *cr);
struct ucred *crget(void);
struct ucred *crhold(struct ucred *cr);
-int crshared(struct ucred *cr);
void cru2x(struct ucred *cr, struct xucred *xcr);
void crsetgroups(struct ucred *cr, int n, gid_t *groups);
int groupmember(gid_t gid, struct ucred *cred);
More information about the Midnightbsd-cvs
mailing list