aboutsummaryrefslogtreecommitdiffstats
path: root/sys/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/acct.h2
-rw-r--r--sys/sys/buf.h8
-rw-r--r--sys/sys/callout.h2
-rw-r--r--sys/sys/conf.h4
-rw-r--r--sys/sys/disklabel.h3
-rw-r--r--sys/sys/dkstat.h2
-rw-r--r--sys/sys/errno.h2
-rw-r--r--sys/sys/exec.h4
-rw-r--r--sys/sys/fcntl.h2
-rw-r--r--sys/sys/ftape.h5
-rw-r--r--sys/sys/ioctl.h9
-rw-r--r--sys/sys/ioctl_compat.h2
-rw-r--r--sys/sys/ipc.h2
-rw-r--r--sys/sys/kernel.h11
-rw-r--r--sys/sys/malloc.h17
-rw-r--r--sys/sys/map.h2
-rw-r--r--sys/sys/mbuf.h54
-rw-r--r--sys/sys/mount.h5
-rw-r--r--sys/sys/namei.h2
-rw-r--r--sys/sys/param.h2
-rw-r--r--sys/sys/proc.h2
-rw-r--r--sys/sys/procfs.h24
-rw-r--r--sys/sys/signal.h2
-rw-r--r--sys/sys/specdev.h4
-rw-r--r--sys/sys/stat.h2
-rw-r--r--sys/sys/syscall.h6
-rw-r--r--sys/sys/systm.h42
-rw-r--r--sys/sys/termios.h8
-rw-r--r--sys/sys/timeb.h2
-rw-r--r--sys/sys/times.h2
-rw-r--r--sys/sys/timex.h290
-rw-r--r--sys/sys/tty.h55
-rw-r--r--sys/sys/ttydefaults.h8
-rw-r--r--sys/sys/types.h2
-rw-r--r--sys/sys/unistd.h12
35 files changed, 498 insertions, 103 deletions
diff --git a/sys/sys/acct.h b/sys/sys/acct.h
index a152907c8840..46ef5c3548b8 100644
--- a/sys/sys/acct.h
+++ b/sys/sys/acct.h
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)acct.h 7.3 (Berkeley) 2/15/91
- * $Id: acct.h,v 1.3.2.1 1994/05/04 07:57:00 rgrimes Exp $
+ * $Id: acct.h,v 1.4 1994/05/04 08:30:10 rgrimes Exp $
*/
#ifndef _SYS_ACCT_H_
diff --git a/sys/sys/buf.h b/sys/sys/buf.h
index ab5685893f3f..502d20fa2a61 100644
--- a/sys/sys/buf.h
+++ b/sys/sys/buf.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)buf.h 7.11 (Berkeley) 5/9/90
- * $Id: buf.h,v 1.7 1993/12/22 12:51:48 davidg Exp $
+ * $Id: buf.h,v 1.10 1994/04/20 07:07:01 davidg Exp $
*/
#ifndef _SYS_BUF_H_
@@ -79,6 +79,7 @@ struct buf
struct buf *b_forw, *b_back; /* hash chain (2 way street) */
struct buf *av_forw, *av_back; /* position on free list if not BUSY */
struct buf *b_blockf, **b_blockb;/* associated vnode */
+ struct buf *b_clusterf, *b_clusterl;/* cluster list */
#define b_actf av_forw /* alternate names for driver queue */
#define b_actl av_back /* head - isn't history wonderful */
long b_bcount; /* transfer count */
@@ -96,6 +97,7 @@ struct buf
daddr_t *b_daddr; /* indirect block */
} b_un;
daddr_t b_lblkno; /* logical block number */
+ daddr_t b_pblkno; /* physical block number */
daddr_t b_blkno; /* block # on device */
long b_resid; /* words not transferred after error */
#define b_errcnt b_resid /* while i/o in progress: # retries */
@@ -107,6 +109,7 @@ struct buf
struct ucred *b_wcred; /* ref to write credendtials */
int b_dirtyoff; /* offset in buffer of dirty region */
int b_dirtyend; /* offset of end of dirty region */
+ caddr_t b_savekva; /* saved kva for transfer while bouncing */
caddr_t b_saveaddr; /* original b_addr for PHYSIO */
void * b_driver1; /* for private use by the driver */
void * b_driver2; /* for private use by the driver */
@@ -186,7 +189,7 @@ extern int physio(void (*)(struct buf *), int, struct buf *, int, int,
#define B_VMPAGE 0x000800 /* buffer from virtual memory */
#define B_MALLOC 0x001000 /* buffer from malloc space */
#define B_DIRTY 0x002000 /* dirty page to be pushed out async */
-#define B_PGIN 0x004000 /* pagein op, so swap() can count it */
+#define B_CLUSTER 0x004000 /* pagein op, so swap() can count it */
#define B_CACHE 0x008000 /* did bread find us in the cache ? */
#define B_INVAL 0x010000 /* does not contain valid info */
#define B_LOCKED 0x020000 /* locked in core (not reusable) */
@@ -200,6 +203,7 @@ extern int physio(void (*)(struct buf *), int, struct buf *, int, int,
#define B_DRIVER2 0x2000000 /* bits for the driver to use */
#define B_DRIVER4 0x3000000 /* bits for the driver to use */
#define B_DRIVER8 0x4000000 /* bits for the driver to use */
+#define B_BOUNCE 0x8000000 /* bounce buffer flag */
/*
* Insq/Remq for the buffer hash lists.
diff --git a/sys/sys/callout.h b/sys/sys/callout.h
index d23e152c0f76..cdc1b8e94586 100644
--- a/sys/sys/callout.h
+++ b/sys/sys/callout.h
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)callout.h 7.2 (Berkeley) 2/15/91
- * $Id: callout.h,v 1.4.2.1 1994/05/04 07:57:02 rgrimes Exp $
+ * $Id: callout.h,v 1.5 1994/05/04 08:30:18 rgrimes Exp $
*/
#ifndef _SYS_CALLOUT_H_
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index 0dcfe9796ad5..7280962373ca 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)conf.h 7.9 (Berkeley) 5/5/91
- * $Id: conf.h,v 1.4.2.1 1994/05/04 07:57:05 rgrimes Exp $
+ * $Id: conf.h,v 1.6 1994/05/04 08:30:22 rgrimes Exp $
*/
#ifndef _SYS_CONF_H_
@@ -88,7 +88,7 @@ struct cdevsw {
d_ioctl_t *d_ioctl;
d_stop_t *d_stop;
d_reset_t *d_reset;
- struct tty *d_ttys;
+ struct tty **d_ttys;
d_select_t *d_select;
d_mmap_t *d_mmap;
d_strategy_t *d_strategy;
diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h
index 32da62f94e28..0db4d3ffb79f 100644
--- a/sys/sys/disklabel.h
+++ b/sys/sys/disklabel.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)disklabel.h 7.19 (Berkeley) 5/7/91
- * $Id: disklabel.h,v 1.6 1993/12/19 00:55:13 wollman Exp $
+ * $Id: disklabel.h,v 1.7 1994/04/05 03:23:38 davidg Exp $
*/
#ifndef _SYS_DISKLABEL_H_
@@ -355,6 +355,7 @@ char *readdisklabel(int, d_strategy_t *, struct disklabel *,
struct dos_partition *, struct dkbad *, struct buf **);
void disksort(struct buf *, struct buf *);
+void cldisksort(struct buf *, struct buf *, vm_offset_t);
int writedisklabel(int, d_strategy_t *, struct disklabel *,
struct dos_partition *);
diff --git a/sys/sys/dkstat.h b/sys/sys/dkstat.h
index bbaffb27332d..2e374e584d8b 100644
--- a/sys/sys/dkstat.h
+++ b/sys/sys/dkstat.h
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)dkstat.h 7.5 (Berkeley) 2/15/91
- * $Id: dkstat.h,v 1.3.2.1 1994/05/04 07:57:07 rgrimes Exp $
+ * $Id: dkstat.h,v 1.4 1994/05/04 08:30:25 rgrimes Exp $
*/
#ifndef _SYS_DKSTAT_H_
diff --git a/sys/sys/errno.h b/sys/sys/errno.h
index fe26b1b732bd..1842041c86d2 100644
--- a/sys/sys/errno.h
+++ b/sys/sys/errno.h
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)errno.h 7.13 (Berkeley) 2/19/91
- * $Id: errno.h,v 1.3.2.1 1994/05/04 07:57:09 rgrimes Exp $
+ * $Id: errno.h,v 1.4 1994/05/04 08:30:30 rgrimes Exp $
*/
#ifndef _SYS_ERRNO_H_
diff --git a/sys/sys/exec.h b/sys/sys/exec.h
index 783bea504e2a..e3e94005b7de 100644
--- a/sys/sys/exec.h
+++ b/sys/sys/exec.h
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)exec.h 7.5 (Berkeley) 2/15/91
- * $Id: exec.h,v 1.4.2.1 1994/05/04 07:57:10 rgrimes Exp $
+ * $Id: exec.h,v 1.6 1994/05/04 08:30:34 rgrimes Exp $
*/
#ifndef _EXEC_H_
@@ -66,7 +66,7 @@ unsigned long a_drsize; /* data relocation size */
#define OMAGIC 0407 /* old impure format */
#define NMAGIC 0410 /* read-only text */
#define ZMAGIC 0413 /* demand load format */
-#define QMAGIC 0314 /* "compact" demand load format -- DEPRICATE */
+#define QMAGIC 0314 /* "compact" demand load format */
/* a_mid */
#define MID_ZERO 0 /* unknown - implementation dependent */
diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h
index 6e3acd7d8550..0990a7e4af62 100644
--- a/sys/sys/fcntl.h
+++ b/sys/sys/fcntl.h
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)fcntl.h 5.14 (Berkeley) 7/1/91
- * $Id: fcntl.h,v 1.2.4.1 1994/05/04 07:57:14 rgrimes Exp $
+ * $Id: fcntl.h,v 1.3 1994/05/04 08:30:37 rgrimes Exp $
*/
#ifndef _FCNTL_H_
diff --git a/sys/sys/ftape.h b/sys/sys/ftape.h
index 67fd33d0803b..79a644276ad0 100644
--- a/sys/sys/ftape.h
+++ b/sys/sys/ftape.h
@@ -40,6 +40,9 @@
#define QCV_ECCBLKS 3 /* Blocks ecc eats */
#define QCV_NFMT 3 /* Number of tape formats */
#define QCV_NLEN 5 /* Number of tape lengths */
+#define QCV_HDRMAGIC 0xaa55aa55 /* Magic for header segment */
+#define QCV_FSMAGIC 0x33cc33cc /* Magic for fileset */
+
#define UCHAR unsigned char
#define USHORT unsigned short
#define ULONG unsigned long
@@ -92,6 +95,8 @@ typedef struct qic_hwinfo {
#define QIOCONFIG _IOR('q', 15, int) /* Get tape config */
#define QIOGEOM _IOR('q', 16, QIC_Geom) /* Get geometry */
#define QIOHWINFO _IOR('q', 17, QIC_HWInfo) /* Get hardware inf */
+#define QIOSENDHDR _IOW('q', 18, QIC_Segment) /* Send header */
+#define QIORECVHDR _IOWR('q', 19, QIC_Segment) /* Receive header */
/* QIC drive status bits. */
#define QS_READY 0x01 /* Drive ready */
diff --git a/sys/sys/ioctl.h b/sys/sys/ioctl.h
index 57d812b27ea6..103cd12f39bc 100644
--- a/sys/sys/ioctl.h
+++ b/sys/sys/ioctl.h
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)ioctl.h 7.19 (Berkeley) 6/26/91
- * $Id: ioctl.h,v 1.6.2.1 1994/05/04 07:57:16 rgrimes Exp $
+ * $Id: ioctl.h,v 1.10 1994/05/30 03:29:53 ache Exp $
*/
#ifndef _IOCTL_H_
@@ -154,10 +154,10 @@ struct ttysize {
#define TIOCEXT _IOW('t', 96, int) /* pty: external processing */
#define TIOCSIG _IO('t', 95) /* pty: generate signal */
#define TIOCDRAIN _IO('t', 94) /* wait till output drained */
-#define TIOCMSBIDIR _IOW('t', 93, int) /* modem: set bidir cap. */
-#define TIOCMGBIDIR _IOR('t', 92, int) /* modem: get bidir cap. */
#define TIOCMSDTRWAIT _IOW('t', 91, int) /* modem: set wait on close */
#define TIOCMGDTRWAIT _IOR('t', 90, int) /* modem: get wait on close */
+#define TIOCTIMESTAMP _IOR('t', 89, struct timeval) /* get timestamp of
+ last interrupt for xntp. */
#define TTYDISC 0 /* termios tty line discipline */
#define NETLDISC 1 /* line discip for berk net */
@@ -220,6 +220,9 @@ struct ttysize {
#define SIOCSIFASYNCMAP _IOW('i', 125, struct ifreq) /* set ppp asyncmap */
#define SIOCGIFASYNCMAP _IOWR('i',124, struct ifreq) /* get ppp asyncmap */
+#define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* add m'cast addr */
+#define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* del m'cast addr */
+
#ifndef KERNEL
#include <sys/cdefs.h>
diff --git a/sys/sys/ioctl_compat.h b/sys/sys/ioctl_compat.h
index f9e05b6a1be5..92bbc6e3a4eb 100644
--- a/sys/sys/ioctl_compat.h
+++ b/sys/sys/ioctl_compat.h
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)ioctl_compat.h 7.4 (Berkeley) 2/5/91
- * $Id: ioctl_compat.h,v 1.3.2.1 1994/05/04 07:57:20 rgrimes Exp $
+ * $Id: ioctl_compat.h,v 1.4 1994/05/04 08:30:45 rgrimes Exp $
*/
#ifndef _IOCTL_COMPAT_H_
diff --git a/sys/sys/ipc.h b/sys/sys/ipc.h
index 8083cf60a390..afa286111614 100644
--- a/sys/sys/ipc.h
+++ b/sys/sys/ipc.h
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)ipc.h 7.2 (Berkeley) 2/5/91
- * $Id: ipc.h,v 1.3.2.1 1994/05/04 07:57:23 rgrimes Exp $
+ * $Id: ipc.h,v 1.4 1994/05/04 08:30:48 rgrimes Exp $
*/
/*
diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h
index d1bb596d0997..5b90b62db202 100644
--- a/sys/sys/kernel.h
+++ b/sys/sys/kernel.h
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)kernel.h 7.4 (Berkeley) 2/15/91
- * $Id: kernel.h,v 1.8.2.1 1994/05/04 07:57:25 rgrimes Exp $
+ * $Id: kernel.h,v 1.11 1994/05/04 08:30:51 rgrimes Exp $
*/
#ifndef _SYS_KERNEL_H_
@@ -78,7 +78,12 @@ extern char *s_lowpc;
extern const char *panicstr; /* panic message */
extern const char version[]; /* system version */
-extern const char copyright[]; /* system copyright */
+extern const char ostype[]; /* operating system type */
+extern const char osrelease[]; /* operating system release */
+extern const int osbuild; /* operating system build number */
+extern const char osconfig[]; /* operating system configuration name */
+extern const char machine[]; /* machine type */
+extern const char *cpu_model; /* CPU model */
extern int nblkdev; /* number of entries in bdevsw */
extern int nchrdev; /* number of entries in cdevsw */
@@ -109,7 +114,7 @@ extern u_char curpri; /* priority of current process */
* are collected by the linker into a `struct linker_set' as defined below.
*
* NB: the constants defined below must match those defined in
- * /usr/src/gnu/ld/ld.h. Since their calculation requires arithmetic, we
+ * ld/ld.h. Since their calculation requires arithmetic, we
* can't name them symbolically (e.g., 23 is N_SETT | N_EXT).
*/
#define MAKE_SET(set, sym, type) \
diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h
index e1fbf7752fc4..d9d45921f9c3 100644
--- a/sys/sys/malloc.h
+++ b/sys/sys/malloc.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)malloc.h 7.25 (Berkeley) 5/15/91
- * $Id: malloc.h,v 1.4 1993/11/07 17:52:43 wollman Exp $
+ * $Id: malloc.h,v 1.7 1994/05/17 22:31:21 jkh Exp $
*/
#ifndef _MALLOC_H_
@@ -91,6 +91,11 @@
#define M_LOCKF 40 /* Byte-range locking structures */
#define M_PROC 41 /* Proc structures */
#define M_SUBPROC 42 /* Proc sub-structures */
+#define M_IPMOPTS 43 /* Internet multicast options */
+#define M_IPMADDR 44 /* Internet multicast address */
+#define M_IFMADDR 45 /* link-level multicast address */
+#define M_MRTABLE 46 /* multicast routing tables */
+#define M_TTYS 47 /* allocated tty structures */
#define M_ISOFSMNT 48 /* isofs mount structures */
#define M_TEMP 49 /* misc temporary data buffers */
#define M_PCFSMNT 50 /* PCFS mount structure */
@@ -141,8 +146,12 @@
"file desc", /* 39 M_FILEDESC */ \
"lockf", /* 40 M_LOCKF */ \
"proc", /* 41 M_PROC */ \
- "subproc", /* 42 M_PROC */ \
- 0, 0, 0, 0, 0, \
+ "subproc", /* 42 M_SUBPROC */ \
+ "mcast opts", /* 43 M_IPMOPTS */ \
+ "ip mcast", /* 44 M_IPMADDR */ \
+ "if mcast", /* 45 M_IFMADDR */ \
+ "mcast route", /* 46 M_MRTABLE */ \
+ "ttys", /* 47 M_TTYS */ \
"isofs mount", /* 48 M_ISOFSMNT */ \
"temp", /* 49 M_TEMP */ \
"PCFS mount", /* 50 M_PCFSMNT */ \
@@ -270,5 +279,7 @@ extern char *kmembase;
extern struct kmembuckets bucket[];
extern void *malloc __P((unsigned long size, int type, int flags));
extern void free __P((void *addr, int type));
+extern void *contigmalloc __P((unsigned long size, int type, int flags, unsigned long maxpa,
+ unsigned long alignmask, unsigned long boundarymask));
#endif /* KERNEL */
#endif /* !_MALLOC_H_ */
diff --git a/sys/sys/map.h b/sys/sys/map.h
index b0a4dc2ce8ce..e1ac4e5eefa0 100644
--- a/sys/sys/map.h
+++ b/sys/sys/map.h
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)map.h 7.5 (Berkeley) 5/7/91
- * $Id: map.h,v 1.2.2.1 1994/05/04 07:57:29 rgrimes Exp $
+ * $Id: map.h,v 1.3 1994/05/04 08:30:54 rgrimes Exp $
*/
#ifndef _SYS_MAP_H_
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index ea36d4cced01..e36d6357fca0 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)mbuf.h 7.14 (Berkeley) 12/5/90
- * $Id: mbuf.h,v 1.6 1993/12/19 00:55:19 wollman Exp $
+ * $Id: mbuf.h,v 1.10 1994/06/01 03:06:27 davidg Exp $
*/
#ifndef _SYS_MBUF_H_
@@ -65,7 +65,7 @@
#define mtod(m,t) ((t)((m)->m_data))
#define dtom(x) ((struct mbuf *)((int)(x) & ~(MSIZE-1)))
#define mtocl(x) (((u_int)(x) - (u_int)mbutl) >> MCLSHIFT)
-#define cltom(x) ((caddr_t)((u_int)mbutl + ((u_int)(x) >> MCLSHIFT)))
+#define cltom(x) ((caddr_t)((u_int)mbutl + ((u_int)(x) << MCLSHIFT)))
/* header at beginning of each mbuf: */
struct m_hdr {
@@ -158,8 +158,21 @@ struct mbuf {
* allocates an mbuf and initializes it to contain a packet header
* and internal data.
*/
+
+
+struct mbuf *mbuffree;
+int mbuffreecnt;
#define MGET(m, how, type) { \
- MALLOC((m), struct mbuf *, MSIZE, mbtypes[type], (how)); \
+ int s = splimp(); \
+ if( mbuffree == 0) { \
+ splx(s); \
+ MALLOC((m), struct mbuf *, MSIZE, mbtypes[type], (how)); \
+ } else { \
+ --mbuffreecnt; \
+ (m) = mbuffree; \
+ mbuffree = (m)->m_next; \
+ splx(s); \
+ } \
if (m) { \
(m)->m_type = (type); \
mbstat.m_mtypes[type]++; \
@@ -172,7 +185,16 @@ struct mbuf {
}
#define MGETHDR(m, how, type) { \
- MALLOC((m), struct mbuf *, MSIZE, mbtypes[type], (how)); \
+ disable_intr(); \
+ if( mbuffree == 0) { \
+ enable_intr(); \
+ MALLOC((m), struct mbuf *, MSIZE, mbtypes[type], (how)); \
+ } else { \
+ --mbuffreecnt; \
+ (m) = mbuffree; \
+ mbuffree = (m)->m_next; \
+ enable_intr(); \
+ } \
if (m) { \
(m)->m_type = (type); \
mbstat.m_mtypes[type]++; \
@@ -219,6 +241,7 @@ union mcluster {
(m)->m_data = (m)->m_ext.ext_buf; \
(m)->m_flags |= M_EXT; \
(m)->m_ext.ext_size = MCLBYTES; \
+ (m)->m_ext.ext_free = (void (*)())0; \
} \
}
@@ -237,8 +260,7 @@ union mcluster {
* Free a single mbuf and associated external storage.
* Place the successor, if any, in n.
*/
-#ifdef notyet
-#define MFREE(m, n) \
+#define MFREE(m, nn) \
{ mbstat.m_mtypes[(m)->m_type]--; \
if ((m)->m_flags & M_EXT) { \
if ((m)->m_ext.ext_free) \
@@ -247,19 +269,17 @@ union mcluster {
else \
MCLFREE((m)->m_ext.ext_buf); \
} \
- (n) = (m)->m_next; \
- FREE((m), mbtypes[(m)->m_type]); \
- }
-#else /* notyet */
-#define MFREE(m, nn) \
- { mbstat.m_mtypes[(m)->m_type]--; \
- if ((m)->m_flags & M_EXT) { \
- MCLFREE((m)->m_ext.ext_buf); \
- } \
(nn) = (m)->m_next; \
- FREE((m), mbtypes[(m)->m_type]); \
+ if( mbuffreecnt < 256) { \
+ ++mbuffreecnt; \
+ disable_intr(); \
+ (m)->m_next = mbuffree; \
+ mbuffree = (m); \
+ enable_intr(); \
+ } else { \
+ FREE((m), mbtypes[(m)->m_type]); \
+ } \
}
-#endif
/*
* Copy mbuf pkthdr from from to to.
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index bdbfa9901518..889fb58a9771 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)mount.h 7.22 (Berkeley) 6/3/91
- * $Id: mount.h,v 1.10 1993/12/19 22:54:02 alm Exp $
+ * $Id: mount.h,v 1.11 1994/03/07 11:39:02 davidg Exp $
*/
#ifndef _SYS_MOUNT_H_
@@ -86,7 +86,8 @@ struct statfs {
#define MOUNT_MSDOS 4 /* MSDOS Filesystem */
#define MOUNT_ISOFS 5 /* iso9660 cdrom */
#define MOUNT_PROCFS 6 /* proc filesystem */
-#define MOUNT_MAXTYPE 6
+#define MOUNT_DEVFS 7 /* device filesystem */
+#define MOUNT_MAXTYPE 7
/*
* Structure per mounted file system.
diff --git a/sys/sys/namei.h b/sys/sys/namei.h
index 11320d89a9c5..0e48cb227752 100644
--- a/sys/sys/namei.h
+++ b/sys/sys/namei.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)namei.h 7.15 (Berkeley) 5/15/91
- * $Id: namei.h,v 1.3 1993/11/07 17:52:53 wollman Exp $
+ * $Id: namei.h,v 1.5 1994/05/26 04:29:54 ache Exp $
*/
#ifndef _NAMEI_H_
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 727689567734..bf27fbb53196 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)param.h 7.23 (Berkeley) 5/6/91
- * $Id: param.h,v 1.3.4.1 1994/05/04 07:57:31 rgrimes Exp $
+ * $Id: param.h,v 1.4 1994/05/04 08:30:58 rgrimes Exp $
*/
#ifndef _SYS_PARAM_H_
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index dcee5115b656..83ec20800764 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)proc.h 7.28 (Berkeley) 5/30/91
- * $Id: proc.h,v 1.6.2.1 1994/03/24 08:38:44 rgrimes Exp $
+ * $Id: proc.h,v 1.7 1994/03/15 02:48:51 wollman Exp $
*/
#ifndef _PROC_H_
diff --git a/sys/sys/procfs.h b/sys/sys/procfs.h
index 368226781adc..520734071385 100644
--- a/sys/sys/procfs.h
+++ b/sys/sys/procfs.h
@@ -27,7 +27,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.
*
- * $Id: procfs.h,v 1.1 1993/12/12 12:27:03 davidg Exp $
+ * $Id: procfs.h,v 1.2 1994/03/07 11:39:04 davidg Exp $
*/
#ifndef _SYS_PROCFS_H_
#define _SYS_PROCFS_H_
@@ -44,6 +44,26 @@ struct vmfd { /* Mapped file descriptor */
int fd; /* OUT */
};
+enum vmet { PFS_END, PFS_PRMAP, PFS_OBJINFO };
+
+struct objinfo {
+ int ref_count; /* ref_count for object */
+ int rss_map; /* rss within the map entry */
+ int persist; /* persist flag */
+ int internal; /* internal flag */
+ vm_offset_t offset; /* offset into object */
+ vm_offset_t size; /* total size of object */
+ struct vm_page pages[0]; /* pages */
+};
+
+struct procvminfo { /* Full proc VM info */
+ enum vmet entrytype; /* type of entry */
+ union {
+ struct procmap pm; /* proc map entry */
+ struct objinfo oi; /* object info entry */
+ } u;
+};
+
typedef unsigned long fltset_t;
#define PIOCGPINFO _IOR('P', 0, struct kinfo_proc)
@@ -54,5 +74,7 @@ typedef unsigned long fltset_t;
#define PIOCGNMAP _IOR('P', 5, int)
#define PIOCGMAP _IO ('P', 6)
#define PIOCGMAPFD _IOWR('P', 7, struct vmfd)
+#define PIOCGNVMINFO _IOR('P', 8, int)
+#define PIOCGVMINFO _IO ('P', 9)
#endif /* _SYS_PROCFS_H_ */
diff --git a/sys/sys/signal.h b/sys/sys/signal.h
index 348ccb28c632..6a4676f58e9c 100644
--- a/sys/sys/signal.h
+++ b/sys/sys/signal.h
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)signal.h 7.16 (Berkeley) 3/17/91
- * $Id: signal.h,v 1.7.2.1 1994/05/04 07:57:33 rgrimes Exp $
+ * $Id: signal.h,v 1.8 1994/05/04 08:31:02 rgrimes Exp $
*/
#ifndef _SIGNAL_H_
diff --git a/sys/sys/specdev.h b/sys/sys/specdev.h
index 119cc5388a63..15c8788854b3 100644
--- a/sys/sys/specdev.h
+++ b/sys/sys/specdev.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)specdev.h 7.4 (Berkeley) 4/19/91
- * $Id: specdev.h,v 1.4 1993/11/25 01:38:04 wollman Exp $
+ * $Id: specdev.h,v 1.5 1994/05/30 03:30:29 ache Exp $
*/
#ifndef _SYS_SPECDEV_H_
@@ -47,6 +47,7 @@ struct specinfo {
struct vnode *si_specnext;
long si_flags;
dev_t si_rdev;
+ short si_opencount; /* count of sleeping openers */
};
/*
* Exported shorthand
@@ -55,6 +56,7 @@ struct specinfo {
#define v_hashchain v_specinfo->si_hashchain
#define v_specnext v_specinfo->si_specnext
#define v_specflags v_specinfo->si_flags
+#define v_opencount v_specinfo->si_opencount
/*
* Flags for specinfo
diff --git a/sys/sys/stat.h b/sys/sys/stat.h
index fe4f8f19321d..0c661950ed21 100644
--- a/sys/sys/stat.h
+++ b/sys/sys/stat.h
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)stat.h 7.11 (Berkeley) 3/3/91
- * $Id: stat.h,v 1.4.4.1 1994/05/04 07:57:35 rgrimes Exp $
+ * $Id: stat.h,v 1.5 1994/05/04 08:31:05 rgrimes Exp $
*/
#ifndef _SYS_STAT_H_
diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h
index 491ccd5d6f1a..6b2c63a13ece 100644
--- a/sys/sys/syscall.h
+++ b/sys/sys/syscall.h
@@ -4,7 +4,7 @@
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from $Id: syscalls.master,v 1.8 1994/01/31 10:27:25 davidg Exp $
+ * created from $Id: syscalls.master,v 1.9 1994/03/15 01:58:33 wollman Exp $
*/
#define SYS_exit 1
@@ -169,6 +169,8 @@
#define SYS_semsys 169
#define SYS_msgsys 170
#define SYS_shmsys 171
+#define SYS_ntp_gettime 175
+#define SYS_ntp_adjtime 176
#define SYS_vm_allocate 177
#define SYS_vm_deallocate 178
#define SYS_vm_inherit 179
@@ -176,4 +178,4 @@
#define SYS_setgid 181
#define SYS_setegid 182
#define SYS_seteuid 183
-#endif /* _SYS_SYSCALL_H_ */ \ No newline at end of file
+#endif /* _SYS_SYSCALL_H_ */
diff --git a/sys/sys/systm.h b/sys/sys/systm.h
index b7ca8af23b5c..fce5b1755c89 100644
--- a/sys/sys/systm.h
+++ b/sys/sys/systm.h
@@ -38,15 +38,24 @@
* SUCH DAMAGE.
*
* from: @(#)systm.h 7.17 (Berkeley) 5/25/91
- * $Id: systm.h,v 1.9.2.1 1994/05/04 07:57:37 rgrimes Exp $
+ * $Id: systm.h,v 1.11 1994/05/04 08:31:08 rgrimes Exp $
*/
#ifndef _SYS_SYSTM_H_
#define _SYS_SYSTM_H_
-#include "sys/param.h"
+#include "sys/param.h" /* XXX */
#include "sys/sysent.h" /* XXX */
+/*
+ * Machine-dependent function declarations.
+ * These must be first in case a machine-dependent function is static
+ * [inline]. ANSI C's linkage scope rules require the static version
+ * to be visible first. However, if the machine-dependent functions
+ * were actually macros, they would have to be defined last.
+ */
+#include <machine/cpufunc.h>
+
/* Initialize the world */
void startrtclock __P((void));
void consinit __P((void));
@@ -78,17 +87,18 @@ void selwakeup __P((int /*pid_t*/, int));
extern int selwait; /* select timeout address */
-/* SPL Levels */
-extern int splbio(void);
-extern int splclock(void);
-extern int splhigh(void);
-extern int splimp(void);
-extern int splnet(void);
-extern int splsoftclock(void);
-extern int spltty(void);
-extern int splnone(void);
-extern int splx(int);
-#define spl0 splnone
+/* Interrupt masking. */
+void spl0 __P((void));
+int splbio __P((void));
+int splclock __P((void));
+int splhigh __P((void));
+int splimp __P((void));
+int splnet __P((void));
+#define splnone spl0 /* XXX traditional; the reverse is better */
+int splsoftclock __P((void));
+int splsofttty __P((void));
+int spltty __P((void));
+void splx __P((int));
/* Scheduling */
@@ -181,7 +191,6 @@ void boot __P((int));
/* string functions */
-size_t strlen __P((const char *));
int strcmp __P((const char *, const char *));
char *strncpy __P((char *, const char *, int));
char *strcat __P((char *, const char *));
@@ -195,13 +204,8 @@ int bcmp __P((const void *str1, const void *str2, u_int len));
int scanc __P((unsigned size, u_char *cp, u_char *table, int mask));
int skpc __P((int, u_int, u_char *));
int locc __P((int, unsigned, u_char *));
-int ffs __P((long));
/* Debugger entry points */
void Debugger __P((const char *));
-/*
- * Machine-dependent function declarations.
- */
-#include <machine/cpufunc.h>
#endif /* _SYS_SYSTM_H_ */
diff --git a/sys/sys/termios.h b/sys/sys/termios.h
index d8be611142d3..a49f7e7d3a6f 100644
--- a/sys/sys/termios.h
+++ b/sys/sys/termios.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)termios.h 7.22 (Berkeley) 5/7/91
- * $Id: termios.h,v 1.8 1994/01/31 07:38:18 ache Exp $
+ * $Id: termios.h,v 1.9 1994/05/30 03:31:04 ache Exp $
*/
/*
@@ -181,7 +181,7 @@
typedef unsigned long tcflag_t;
typedef unsigned char cc_t;
-typedef long speed_t;
+typedef long speed_t; /* XXX should be unsigned long */
struct termios {
tcflag_t c_iflag; /* input flags */
@@ -189,8 +189,8 @@ struct termios {
tcflag_t c_cflag; /* control flags */
tcflag_t c_lflag; /* local flags */
cc_t c_cc[NCCS]; /* control chars */
- long c_ispeed; /* input speed */
- long c_ospeed; /* output speed */
+ speed_t c_ispeed; /* input speed */
+ speed_t c_ospeed; /* output speed */
};
/*
diff --git a/sys/sys/timeb.h b/sys/sys/timeb.h
index 1ada939b0cf7..e846ee2e08a4 100644
--- a/sys/sys/timeb.h
+++ b/sys/sys/timeb.h
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)timeb.h 7.2 (Berkeley) 5/5/91
- * $Id: timeb.h,v 1.3.2.1 1994/05/04 07:57:40 rgrimes Exp $
+ * $Id: timeb.h,v 1.4 1994/05/04 08:31:12 rgrimes Exp $
*/
#ifndef _SYS_TIMEB_H_
diff --git a/sys/sys/times.h b/sys/sys/times.h
index 29a73f82e5c2..2bb24632ed9c 100644
--- a/sys/sys/times.h
+++ b/sys/sys/times.h
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)times.h 7.6 (Berkeley) 3/9/91
- * $Id: times.h,v 1.3.2.1 1994/05/04 07:57:42 rgrimes Exp $
+ * $Id: times.h,v 1.4 1994/05/04 08:31:16 rgrimes Exp $
*/
#ifndef _SYS_TIMES_H_
diff --git a/sys/sys/timex.h b/sys/sys/timex.h
new file mode 100644
index 000000000000..8390ceddca6c
--- /dev/null
+++ b/sys/sys/timex.h
@@ -0,0 +1,290 @@
+/******************************************************************************
+ * *
+ * Copyright (c) David L. Mills 1993, 1994 *
+ * *
+ * Permission to use, copy, modify, and distribute this software and its *
+ * documentation for any purpose and without fee is hereby granted, provided *
+ * that the above copyright notice appears in all copies and that both the *
+ * copyright notice and this permission notice appear in supporting *
+ * documentation, and that the name University of Delaware not be used in *
+ * advertising or publicity pertaining to distribution of the software *
+ * without specific, written prior permission. The University of Delaware *
+ * makes no representations about the suitability this software for any *
+ * purpose. It is provided "as is" without express or implied warranty. *
+ * *
+ ******************************************************************************/
+
+/*
+ * Modification history timex.h
+ *
+ * 19 Mar 94 David L. Mills
+ * Moved defines from kernel routines to header file and added new
+ * defines for PPS phase-lock loop.
+ *
+ * 20 Feb 94 David L. Mills
+ * Revised status codes and structures for external clock and PPS
+ * signal discipline.
+ *
+ * 28 Nov 93 David L. Mills
+ * Adjusted parameters to improve stability and increase poll
+ * interval.
+ *
+ * 17 Sep 93 David L. Mills
+ * Created file
+ */
+/*
+ * This header file defines the Network Time Protocol (NTP) interfaces
+ * for user and daemon application programs. These are implemented using
+ * private syscalls and data structures and require specific kernel
+ * support.
+ *
+ * NAME
+ * ntp_gettime - NTP user application interface
+ *
+ * SYNOPSIS
+ * #include <sys/timex.h>
+ *
+ * int syscall(SYS_ntp_gettime, tptr)
+ *
+ * int SYS_ntp_gettime defined in syscall.h header file
+ * struct ntptimeval *tptr pointer to ntptimeval structure
+ *
+ * NAME
+ * ntp_adjtime - NTP daemon application interface
+ *
+ * SYNOPSIS
+ * #include <sys/timex.h>
+ *
+ * int syscall(SYS_ntp_adjtime, mode, tptr)
+ *
+ * int SYS_ntp_adjtime defined in syscall.h header file
+ * struct timex *tptr pointer to timex structure
+ *
+ */
+#ifndef _SYS_TIMEX_H_
+#define _SYS_TIMEX_H_ 1
+
+#ifndef MSDOS /* Microsoft specific */
+#include <sys/syscall.h>
+#endif /* MSDOS */
+
+/*
+ * The following defines establish the engineering parameters of the
+ * phase-lock loop (PLL) model used in the kernel implementation. These
+ * parameters have been carefully chosen by analysis for good stability
+ * and wide dynamic range.
+ *
+ * The hz variable is defined in the kernel build environment. It
+ * establishes the timer interrupt frequency, 100 Hz for the SunOS
+ * kernel, 256 Hz for the Ultrix kernel and 1024 Hz for the OSF/1
+ * kernel. SHIFT_HZ expresses the same value as the nearest power of two
+ * in order to avoid hardware multiply operations.
+ *
+ * SHIFT_KG and SHIFT_KF establish the damping of the PLL and are chosen
+ * for a slightly underdamped convergence characteristic.
+ *
+ * MAXTC establishes the maximum time constant of the PLL. With the
+ * SHIFT_KG and SHIFT_KF values given and a time constant range from
+ * zero to MAXTC, the PLL will converge in 15 minutes to 16 hours,
+ * respectively.
+ */
+#define SHIFT_HZ 7 /* log2(hz) */
+#define SHIFT_KG 6 /* phase factor (shift) */
+#define SHIFT_KF 16 /* frequency factor (shift) */
+#define MAXTC 6 /* maximum time constant (shift) */
+
+/*
+ * The following defines establish the scaling of the various variables
+ * used by the PLL. They are chosen to allow the greatest precision
+ * possible without overflow of a 32-bit word.
+ *
+ * SHIFT_SCALE defines the scaling (shift) of the time_phase variable,
+ * which serves as a an extension to the low-order bits of the system
+ * clock variable time.tv_usec.
+ *
+ * SHIFT_UPDATE defines the scaling (shift) of the time_offset variable,
+ * which represents the current time offset with respect to standard
+ * time.
+ *
+ * SHIFT_USEC defines the scaling (shift) of the time_freq and
+ * time_tolerance variables, which represent the current frequency
+ * offset and maximum frequency tolerance.
+ *
+ * FINEUSEC is 1 us in SHIFT_UPDATE units of the time_phase variable.
+ */
+#define SHIFT_SCALE 23 /* phase scale (shift) */
+#define SHIFT_UPDATE (SHIFT_KG + MAXTC) /* time offset scale (shift) */
+#define SHIFT_USEC 16 /* frequency offset scale (shift) */
+#define FINEUSEC (1L << SHIFT_SCALE) /* 1 us in phase units */
+
+/*
+ * The following defines establish the performance envelope of the PLL.
+ * They insure it operates within predefined limits, in order to satisfy
+ * correctness assertions. An excursion which exceeds these bounds is
+ * clamped to the bound and operation proceeds accordingly. In practice,
+ * this can occur only if something has failed or is operating out of
+ * tolerance, but otherwise the PLL continues to operate in a stable
+ * mode.
+ *
+ * MAXPHASE must be set greater than or equal to CLOCK.MAX (128 ms), as
+ * defined in the NTP specification. CLOCK.MAX establishes the maximum
+ * time offset allowed before the system time is reset, rather than
+ * incrementally adjusted. Here, the maximum offset is clamped to
+ * MAXPHASE only in order to prevent overflow errors due to defective
+ * protocol implementations.
+ *
+ * MAXFREQ is the maximum frequency tolerance of the CPU clock
+ * oscillator plus the maximum slew rate allowed by the protocol. It
+ * should be set to at least the frequency tolerance of the oscillator
+ * plus 100 ppm for vernier frequency adjustments. If the kernel
+ * PPS discipline code is configured (PPS_SYNC), the oscillator time and
+ * frequency are disciplined to an external source, presumably with
+ * negligible time and frequency error relative to UTC, and MAXFREQ can
+ * be reduced.
+ *
+ * MAXTIME is the maximum jitter tolerance of the PPS signal if the
+ * kernel PPS discipline code is configured (PPS_SYNC).
+ *
+ * MINSEC and MAXSEC define the lower and upper bounds on the interval
+ * between protocol updates.
+ */
+#define MAXPHASE 128000L /* max phase error (us) */
+#ifdef PPS_SYNC
+#define MAXFREQ (100L << SHIFT_USEC) /* max freq error (100 ppm) */
+#define MAXTIME (200L << PPS_AVG) /* max PPS error (jitter) (200 us) */
+#else
+#define MAXFREQ (200L << SHIFT_USEC) /* max freq error (200 ppm) */
+#endif /* PPS_SYNC */
+#define MINSEC 16L /* min interval between updates (s) */
+#define MAXSEC 1200L /* max interval between updates (s) */
+
+#ifdef PPS_SYNC
+/*
+ * The following defines are used only if a pulse-per-second (PPS)
+ * signal is available and connected via a modem control lead, such as
+ * produced by the optional ppsclock feature incorporated in the Sun
+ * asynch driver. They establish the design parameters of the frequency-
+ * lock loop used to discipline the CPU clock oscillator to the PPS
+ * signal.
+ *
+ * PPS_AVG is the averaging factor for the frequency loop, as well as
+ * the time and frequency dispersion.
+ *
+ * PPS_SHIFT and PPS_SHIFTMAX specify the minimum and maximum
+ * calibration intervals, respectively, in seconds as a power of two.
+ *
+ * PPS_VALID is the maximum interval before the PPS signal is considered
+ * invalid and protocol updates used directly instead.
+ *
+ * MAXGLITCH is the maximum interval before a time offset of more than
+ * MAXTIME is believed.
+ */
+#define PPS_AVG 2 /* pps averaging constant (shift) */
+#define PPS_SHIFT 2 /* min interval duration (s) (shift) */
+#define PPS_SHIFTMAX 8 /* max interval duration (s) (shift) */
+#define PPS_VALID 120 /* pps signal watchdog max (s) */
+#define MAXGLITCH 30 /* pps signal glitch max (s) */
+#endif /* PPS_SYNC */
+
+/*
+ * The following defines and structures define the user interface for
+ * the ntp_gettime() and ntp_adjtime() system calls.
+ *
+ * Control mode codes (timex.modes)
+ */
+#define MOD_OFFSET 0x0001 /* set time offset */
+#define MOD_FREQUENCY 0x0002 /* set frequency offset */
+#define MOD_MAXERROR 0x0004 /* set maximum time error */
+#define MOD_ESTERROR 0x0008 /* set estimated time error */
+#define MOD_STATUS 0x0010 /* set clock status bits */
+#define MOD_TIMECONST 0x0020 /* set pll time constant */
+#define MOD_CLKB 0x4000 /* set clock B */
+#define MOD_CLKA 0x8000 /* set clock A */
+
+/*
+ * Status codes (timex.status)
+ */
+#define STA_PLL 0x0001 /* enable PLL updates (rw) */
+#define STA_PPSFREQ 0x0002 /* enable PPS freq discipline (rw) */
+#define STA_PPSTIME 0x0004 /* enable PPS time discipline (rw) */
+
+#define STA_INS 0x0010 /* insert leap (rw) */
+#define STA_DEL 0x0020 /* delete leap (rw) */
+#define STA_UNSYNC 0x0040 /* clock unsynchronized (rw) */
+
+#define STA_PPSSIGNAL 0x0100 /* PPS signal present (ro) */
+#define STA_PPSJITTER 0x0200 /* PPS signal jitter exceeded (ro) */
+#define STA_PPSWANDER 0x0400 /* PPS signal wander exceeded (ro) */
+#define STA_PPSERROR 0x0800 /* PPS signal calibration error (ro) */
+
+#define STA_CLOCKERR 0x1000 /* clock hardware fault (ro) */
+
+#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \
+ STA_PPSERROR | STA_CLOCKERR) /* read-only bits */
+
+/*
+ * Clock states (time_state)
+ */
+#define TIME_OK 0 /* no leap second warning */
+#define TIME_INS 1 /* insert leap second warning */
+#define TIME_DEL 2 /* delete leap second warning */
+#define TIME_OOP 3 /* leap second in progress */
+#define TIME_WAIT 4 /* leap second has occured */
+#define TIME_ERROR 5 /* clock not synchronized */
+
+/*
+ * NTP user interface (ntp_gettime()) - used to read kernel clock values
+ *
+ * Note: maximum error = NTP synch distance = dispersion + delay / 2;
+ * estimated error = NTP dispersion.
+ */
+struct ntptimeval {
+ struct timeval time; /* current time (ro) */
+ long maxerror; /* maximum error (us) (ro) */
+ long esterror; /* estimated error (us) (ro) */
+};
+
+/*
+ * NTP daemon interface - (ntp_adjtime()) used to discipline CPU clock
+ * oscillator
+ */
+struct timex {
+ unsigned int modes; /* clock mode bits (wo) */
+ long offset; /* time offset (us) (rw) */
+ long freq; /* frequency offset (scaled ppm) (rw) */
+ long maxerror; /* maximum error (us) (rw) */
+ long esterror; /* estimated error (us) (rw) */
+ int status; /* clock status bits (rw) */
+ long constant; /* pll time constant (rw) */
+ long precision; /* clock precision (us) (ro) */
+ long tolerance; /* clock frequency tolerance (scaled
+ * ppm) (ro) */
+ /*
+ * The following read-only structure members are implemented
+ * only if the PPS signal discipline is configured in the
+ * kernel.
+ */
+ long ppsfreq; /* pps frequency (scaled ppm) (ro) */
+ long jitter; /* pps jitter (us) (ro) */
+ int shift; /* interval duration (s) (shift) (ro) */
+ long stabil; /* pps stability (scaled ppm) (ro) */
+ long jitcnt; /* jitter limit exceeded (ro) */
+ long calcnt; /* calibration intervals (ro) */
+ long errcnt; /* calibration errors (ro) */
+ long stbcnt; /* stability limit exceeded (ro) */
+
+};
+#ifdef __FreeBSD__
+
+#ifndef KERNEL
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+extern int ntp_gettime __P((struct ntptimeval *));
+extern int ntp_adjtime __P((struct timex *));
+__END_DECLS
+
+#endif /* not KERNEL */
+
+#endif /* __FreeBSD__ */
+#endif /* _SYS_TIMEX_H_ */
diff --git a/sys/sys/tty.h b/sys/sys/tty.h
index 9c8f11dfc621..9b0417b74e2f 100644
--- a/sys/sys/tty.h
+++ b/sys/sys/tty.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)tty.h 7.10 (Berkeley) 6/26/91
- * $Id: tty.h,v 1.8 1994/01/28 23:15:17 ache Exp $
+ * $Id: tty.h,v 1.12 1994/05/30 21:56:22 ache Exp $
*/
#ifndef _SYS_TTY_H_
@@ -42,8 +42,11 @@
/*
* Ring buffers provide a contiguous, dense storage for
* character data used by the tty driver.
+ *
+ * Make sizeof(struct ringb) be such that it fits exactly in
+ * a malloc bucket.
*/
-#define RBSZ 1024
+#define RBSZ 2040
struct ringb {
char *rb_hd; /* head of buffer segment to be read */
@@ -117,9 +120,9 @@ struct tty {
#if 0
int t_mask; /* interrupt mask */
#endif
- struct ringb t_raw; /* ring buffers */
- struct ringb t_can;
- struct ringb t_out;
+ struct ringb *t_raw; /* ring buffers */
+ struct ringb *t_can;
+ struct ringb *t_out;
};
#define TTIPRI 25 /* sleep priority for tty reads */
@@ -127,30 +130,29 @@ struct tty {
#define TTMASK 15
#define OBUFSIZ 100
-#define TTYHOG 1024
+#define TTYHOG RBSZ
#ifdef KERNEL
#define TTMAXHIWAT (RBSZ/2) /* XXX */
#define TTMINHIWAT 128
#define TTMAXLOWAT 256
#define TTMINLOWAT 32
-extern struct ttychars ttydefaults;
#endif /* KERNEL */
/* internal state bits */
#define TS_TIMEOUT 0x000001UL /* delay timeout in progress */
-#define TS_WOPEN 0x000002UL /* waiting for open to complete */
#define TS_ISOPEN 0x000004UL /* device is open */
#define TS_FLUSH 0x000008UL /* outq has been flushed during DMA */
#define TS_CARR_ON 0x000010UL /* software copy of carrier-present */
#define TS_BUSY 0x000020UL /* output in progress */
-#define TS_ASLEEP 0x000040UL /* wakeup when output done */
+#define TS_SO_OLOWAT 0x000040UL /* wake up when output <= low water */
#define TS_XCLUDE 0x000080UL /* exclusive-use flag against open */
#define TS_TTSTOP 0x000100UL /* output stopped by ctl-s */
-/* was TS_HUPCLS 0x000200UL * hang up upon last close */
+#define TS_ZOMBIE 0x000200UL /* carrier dropped */
#define TS_TBLOCK 0x000400UL /* tandem queue blocked */
#define TS_RCOLL 0x000800UL /* collision in read select */
#define TS_WCOLL 0x001000UL /* collision in write select */
+#define TS_SO_OCOMPLETE 0x002000UL /* wake up when output complete */
#define TS_ASYNC 0x004000UL /* tty in async i/o mode */
/* state for intra-line fancy editing work */
#define TS_BKSL 0x010000UL /* state for lowercase \ work */
@@ -166,6 +168,13 @@ extern struct ttychars ttydefaults;
#define TS_HW_IFLOW (TS_DTR_IFLOW | TS_RTS_IFLOW)
#define TS_LOCAL (TS_BKSL|TS_ERASE|TS_LNCH|TS_TYPEN|TS_CNTTB)
+/*
+ * XXX maintain a single flag to keep track of this combination and fix all
+ * the places that check TS_CARR_ON without checking CLOCAL or TS_ZOMBIE.
+ */
+#define CAN_DO_IO(tp) (((tp)->t_state & (TS_CARR_ON | TS_ZOMBIE)) \
+ == TS_CARR_ON || (tp)->t_cflag & CLOCAL)
+
/* define partab character types */
#define ORDINARY 0
#define CONTROL 1
@@ -206,21 +215,31 @@ struct speedtab {
#define DMBIC 2
#define DMGET 3
-#ifdef KERNEL
-/* symbolic sleep message strings */
-extern const char ttyin[], ttyout[], ttopen[], ttclos[], ttybg[], ttybuf[];
+/*
+ * Sleep addresses.
+ */
+#define TSA_CARR_ON(tp) ((caddr_t)(tp) + 0)
+#define TSA_HUP_OR_INPUT(tp) ((caddr_t)(tp) + 1)
+#define TSA_OCOMPLETE(tp) ((caddr_t)(tp) + 2)
+#define TSA_OLOWAT(tp) ((caddr_t)(tp) + 3)
+#define TSA_PTC_READ(tp) ((caddr_t)(tp) + 4)
+#define TSA_PTC_WRITE(tp) ((caddr_t)(tp) + 5)
+#ifdef KERNEL
+struct proc;
struct uio;
/* From tty.c: */
+extern void termioschars(struct termios *);
extern void ttychars(struct tty *);
-extern int ttwflush(struct tty *);
+extern int ttywflush(struct tty *);
extern int ttywait(struct tty *);
extern void ttyflush(struct tty *, int);
extern void ttstart(struct tty *);
+#if 0 /* XXX not used */
extern void ttrstrt(struct tty *);
+#endif
extern int ttioctl(struct tty *, int, caddr_t, int);
-extern int ttnread(struct tty *);
extern int ttselect(int /*dev_t*/, int, struct proc *);
extern int ttyopen(int /*dev_t*/, struct tty *, int);
extern void ttylclose(struct tty *, int);
@@ -232,17 +251,22 @@ extern int ttread(struct tty *, struct uio *, int);
extern int ttycheckoutq(struct tty *, int);
extern int ttwrite(struct tty *, struct uio *, int);
extern void ttwakeup(struct tty *);
+extern void ttwwakeup(struct tty *);
extern int ttspeedtab(int, struct speedtab *);
extern void ttsetwater(struct tty *);
extern void ttyinfo(struct tty *);
extern int tputchar(int, struct tty *);
extern int ttysleep(struct tty *, caddr_t, int, const char *, int);
+extern struct tty *ttymalloc(struct tty *);
+extern void ttyfree(struct tty *);
/* From tty_ring.c: */
extern int putc(int, struct ringb *);
extern int getc(struct ringb *);
extern int nextc(char **, struct ringb *);
+#if 0 /* XXX not used */
extern int ungetc(int, struct ringb *);
+#endif
extern int unputc(struct ringb *);
extern void initrb(struct ringb *);
extern void catb(struct ringb *, struct ringb *);
@@ -252,4 +276,5 @@ extern size_t rb_write(struct ringb *, char *, size_t);
extern int ttcompat(struct tty *, int, caddr_t, int);
#endif /* KERNEL */
+
#endif /* _SYS_TTY_H_ */
diff --git a/sys/sys/ttydefaults.h b/sys/sys/ttydefaults.h
index 2ce0c9990ea3..cce2c86353db 100644
--- a/sys/sys/ttydefaults.h
+++ b/sys/sys/ttydefaults.h
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)ttydefaults.h 7.9 (Berkeley) 5/9/91
- * $Id: ttydefaults.h,v 1.3.2.1 1994/05/04 07:57:44 rgrimes Exp $
+ * $Id: ttydefaults.h,v 1.5 1994/05/30 03:32:26 ache Exp $
*/
/*
@@ -61,10 +61,10 @@
*/
#define CTRL(x) (x&037)
#define CEOF CTRL('d')
-#define CEOL ((unsigned)'\377') /* XXX avoid _POSIX_VDISABLE */
+#define CEOL 0xFF /* XXX avoid _POSIX_VDISABLE */
#define CERASE 0177
#define CINTR CTRL('c')
-#define CSTATUS ((unsigned)'\377') /* XXX avoid _POSIX_VDISABLE */
+#define CSTATUS 0xFF /* XXX avoid _POSIX_VDISABLE */
#define CKILL CTRL('u')
#define CMIN 1
#define CQUIT 034 /* FS, ^\ */
@@ -90,7 +90,7 @@
* #define TTYDEFCHARS to include an array of default control characters.
*/
#ifdef TTYDEFCHARS
-cc_t ttydefchars[NCCS] = {
+static cc_t ttydefchars[NCCS] = {
CEOF, CEOL, CEOL, CERASE, CWERASE, CKILL, CREPRINT,
_POSIX_VDISABLE, CINTR, CQUIT, CSUSP, CDSUSP, CSTART, CSTOP, CLNEXT,
CDISCARD, CMIN, CTIME, CSTATUS, _POSIX_VDISABLE
diff --git a/sys/sys/types.h b/sys/sys/types.h
index 53aa680a38e2..c69398ba373d 100644
--- a/sys/sys/types.h
+++ b/sys/sys/types.h
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)types.h 7.17 (Berkeley) 5/6/91
- * $Id: types.h,v 1.8.2.1 1994/05/04 07:57:47 rgrimes Exp $
+ * $Id: types.h,v 1.12 1994/05/04 08:31:24 rgrimes Exp $
*/
#ifndef _TYPES_H_
diff --git a/sys/sys/unistd.h b/sys/sys/unistd.h
index fb12c87c9f26..76b4c56d8c4b 100644
--- a/sys/sys/unistd.h
+++ b/sys/sys/unistd.h
@@ -31,22 +31,22 @@
* SUCH DAMAGE.
*
* from: @(#)unistd.h 5.14 (Berkeley) 4/1/91
- * $Id: unistd.h,v 1.4 1994/01/31 07:38:20 ache Exp $
+ * $Id: unistd.h,v 1.7 1994/05/07 20:05:24 wollman Exp $
*/
#ifndef _SYS_UNISTD_H_
#define _SYS_UNISTD_H_
/* compile-time symbolic constants */
-#define _POSIX_JOB_CONTROL /* implementation supports job control */
-#ifdef _NOTYET
-#define _POSIX_SAVED_IDS /* saved set-user-ID and set-group-ID */
+#define _POSIX_JOB_CONTROL 1 /* implementation supports job control */
+#if 0
+#define _POSIX_SAVED_IDS 1 /* saved set-user-ID and set-group-ID */
#endif
#define _POSIX_VERSION 198808L
/* execution-time symbolic constants */
-#define _POSIX_CHOWN_RESTRICTED /* chown requires appropriate privileges */
-#define _POSIX_NO_TRUNC /* too-long path components generate errors */
+#define _POSIX_CHOWN_RESTRICTED 0 /* chown requires appropriate privileges */
+#define _POSIX_NO_TRUNC 0 /* too-long path components generate errors */
/* may disable terminal special characters */
#define _POSIX_VDISABLE 0xFF