aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/CVS/Entries278
-rw-r--r--sys/sys/CVS/Tag1
-rw-r--r--sys/sys/conf.h22
-rw-r--r--sys/sys/disklabel.h32
-rw-r--r--sys/sys/event.h24
-rw-r--r--sys/sys/exec.h21
-rw-r--r--sys/sys/exec_elf.h5
-rw-r--r--sys/sys/filedesc.h10
-rw-r--r--sys/sys/intrmap.h39
-rw-r--r--sys/sys/kcov.h16
-rw-r--r--sys/sys/kernel.h4
-rw-r--r--sys/sys/kstat.h193
-rw-r--r--sys/sys/ktrace.h6
-rw-r--r--sys/sys/mbuf.h22
-rw-r--r--sys/sys/msgbuf.h3
-rw-r--r--sys/sys/param.h6
-rw-r--r--sys/sys/pciio.h10
-rw-r--r--sys/sys/pipe.h5
-rw-r--r--sys/sys/proc.h45
-rw-r--r--sys/sys/reboot.h35
-rw-r--r--sys/sys/sensors.h4
-rw-r--r--sys/sys/signalvar.h13
-rw-r--r--sys/sys/smr.h6
-rw-r--r--sys/sys/srp.h13
-rw-r--r--sys/sys/stdarg.h8
-rw-r--r--sys/sys/sysctl.h35
-rw-r--r--sys/sys/syslog.h11
-rw-r--r--sys/sys/systm.h52
-rw-r--r--sys/sys/task.h6
-rw-r--r--sys/sys/time.h24
-rw-r--r--sys/sys/timeout.h10
-rw-r--r--sys/sys/timetc.h34
-rw-r--r--sys/sys/tty.h6
-rw-r--r--sys/sys/varargs.h7
34 files changed, 676 insertions, 330 deletions
diff --git a/sys/sys/CVS/Entries b/sys/sys/CVS/Entries
index 5813030..9129bd3 100644
--- a/sys/sys/CVS/Entries
+++ b/sys/sys/CVS/Entries
@@ -1,139 +1,141 @@
-/_endian.h/1.8/Thu Jan 11 23:13:37 2018//
-/_lock.h/1.4/Tue Apr 23 13:35:12 2019//
-/_null.h/1.2/Fri Sep 9 22:07:58 2016//
-/_time.h/1.9/Mon Dec 18 05:51:53 2017//
-/_types.h/1.9/Fri Aug 22 23:05:15 2014//
-/acct.h/1.9/Mon Sep 9 20:02:26 2019//
-/ataio.h/1.5/Fri Sep 26 21:43:32 2003//
-/atomic.h/1.6/Sat Mar 9 06:14:21 2019//
-/audioio.h/1.27/Wed Sep 14 06:12:20 2016//
-/buf.h/1.112/Fri Nov 29 01:04:08 2019//
-/cdefs.h/1.43/Mon Oct 29 17:10:40 2018//
-/cdio.h/1.17/Tue Oct 24 09:36:13 2017//
-/chio.h/1.7/Wed May 31 03:01:44 2006//
-/conf.h/1.150/Tue Apr 21 08:29:27 2020//
-/core.h/1.7/Sat Sep 17 06:09:08 2016//
-/ctf.h/1.5/Sun Aug 13 14:56:05 2017//
-/device.h/1.55/Mon Sep 10 16:18:34 2018//
-/dir.h/1.5/Mon Jun 2 23:28:21 2003//
-/dirent.h/1.11/Fri Dec 13 18:09:27 2013//
-/disk.h/1.36/Thu May 4 22:47:27 2017//
-/disklabel.h/1.75/Tue Oct 24 09:36:13 2017//
-/dkio.h/1.12/Tue Oct 24 09:36:13 2017//
-/domain.h/1.20/Thu Jun 13 08:12:11 2019//
-/endian.h/1.25/Sun Dec 21 04:49:00 2014//
-/errno.h/1.25/Tue Sep 5 03:06:26 2017//
-/evcount.h/1.3/Mon Sep 20 06:33:46 2010//
-/event.h/1.35/Tue Apr 7 13:27:52 2020//
-/eventvar.h/1.9/Tue Apr 7 13:27:52 2020//
-/exec.h/1.40/Fri Nov 29 06:34:46 2019//
-/exec_elf.h/1.87/Sun Dec 1 13:10:51 2019//
-/exec_script.h/1.6/Wed Feb 7 20:31:57 2018//
-/extent.h/1.14/Sat Feb 8 20:29:01 2014//
-/fcntl.h/1.22/Mon Jan 21 18:09:21 2019//
-/file.h/1.61/Fri Mar 13 10:07:01 2020//
-/filedesc.h/1.44/Thu Jan 30 15:33:04 2020//
-/filio.h/1.5/Fri Jun 1 22:30:48 2007//
-/fusebuf.h/1.13/Tue Jun 19 11:27:54 2018//
-/futex.h/1.2/Sun Jun 3 15:09:26 2018//
-/gmon.h/1.8/Sat May 7 19:30:52 2016//
-/gpio.h/1.8/Mon Oct 3 20:24:51 2011//
-/hibernate.h/1.42/Thu Jun 21 07:33:30 2018//
-/hotplug.h/1.5/Sun May 28 16:52:34 2006//
-/ioccom.h/1.5/Fri Mar 22 21:22:05 2013//
-/ioctl.h/1.17/Sun Feb 28 15:46:19 2016//
-/ipc.h/1.13/Sat Nov 15 21:42:50 2014//
-/kcore.h/1.1/Thu Apr 18 21:40:57 1996//
-/kcov.h/1.4/Sun Jan 20 09:57:23 2019//
-/kernel.h/1.22/Sat Sep 7 01:23:23 2019//
-/kthread.h/1.7/Tue Feb 18 12:13:40 2020//
-/ktrace.h/1.38/Tue Feb 26 22:24:41 2019//
-/limits.h/1.10/Sat Jun 30 20:21:10 2012//
-/lock.h/1.27/Sun Jun 19 11:54:33 2016//
-/lockf.h/1.17/Sat Apr 20 08:28:59 2019//
-/malloc.h/1.119/Thu Nov 28 16:23:11 2019//
-/mbuf.h/1.246/Wed Jan 22 22:56:35 2020//
-/memrange.h/1.10/Tue Aug 18 20:19:32 2015//
-/mman.h/1.34/Fri Mar 1 01:46:18 2019//
-/mount.h/1.147/Sat Jan 18 08:40:19 2020//
-/mplock.h/1.13/Tue Apr 23 13:35:12 2019//
-/msg.h/1.19/Sun Nov 23 04:31:42 2014//
-/msgbuf.h/1.11/Thu Jun 23 13:15:21 2016//
-/mtio.h/1.9/Fri Jun 1 18:44:48 2007//
-/mutex.h/1.18/Tue Apr 23 13:35:12 2019//
-/namei.h/1.45/Thu Mar 19 13:55:20 2020//
-/param.h/1.130/Sun Apr 5 06:34:20 2020//
-/pciio.h/1.7/Sun Sep 5 18:14:33 2010//
-/percpu.h/1.8/Tue Aug 28 15:15:02 2018//
-/pipe.h/1.24/Fri Jan 24 11:07:41 2020//
-/pledge.h/1.41/Sun Apr 5 07:31:45 2020//
-/poll.h/1.15/Tue Jun 7 06:12:37 2016//
-/pool.h/1.77/Fri Jul 19 09:03:03 2019//
-/proc.h/1.295/Tue Apr 28 08:29:40 2020//
-/protosw.h/1.31/Tue Jan 23 20:49:58 2018//
-/ptrace.h/1.16/Mon Mar 16 11:58:46 2020//
-/queue.h/1.45/Thu Jul 12 14:22:54 2018//
-/radioio.h/1.5/Wed Jan 14 21:15:36 2015//
-/reboot.h/1.18/Mon Apr 1 07:00:52 2019//
-/refcnt.h/1.4/Tue Jun 7 07:53:33 2016//
-/resource.h/1.14/Fri Oct 25 04:42:48 2013//
-/resourcevar.h/1.24/Fri Jun 21 09:39:48 2019//
-/rwlock.h/1.26/Tue Jul 16 01:40:49 2019//
-/sched.h/1.56/Mon Oct 21 10:24:01 2019//
-/scsiio.h/1.10/Wed Sep 5 17:17:47 2012//
-/select.h/1.17/Mon Sep 12 19:41:20 2016//
-/selinfo.h/1.5/Tue Jul 18 19:20:26 2017//
-/sem.h/1.24/Thu Sep 1 08:33:40 2016//
-/sensors.h/1.36/Mon Dec 10 13:35:54 2018//
-/shm.h/1.29/Sun Nov 3 20:16:01 2019//
-/siginfo.h/1.12/Fri Apr 7 04:48:44 2017//
-/sigio.h/1.4/Wed Jan 8 16:27:42 2020//
-/signal.h/1.29/Wed Apr 18 16:05:20 2018//
-/signalvar.h/1.40/Fri Mar 13 09:25:21 2020//
-/smr.h/1.6/Sun Apr 12 07:20:33 2020//
-/socket.h/1.98/Mon Jul 22 15:34:07 2019//
-/socketvar.h/1.91/Wed Jan 15 13:17:35 2020//
-/sockio.h/1.83/Wed Nov 13 11:54:01 2019//
-/specdev.h/1.39/Fri Dec 27 22:17:01 2019//
-/srp.h/1.14/Sun Mar 31 14:03:40 2019//
-/stacktrace.h/1.3/Sat Apr 18 04:45:20 2020//
-/stat.h/1.28/Sat Apr 4 18:06:08 2015//
-/statvfs.h/1.3/Sun Mar 24 17:45:50 2013//
-/stdarg.h/1.9/Thu Dec 12 15:55:36 2019//
-/stdint.h/1.11/Fri Jan 25 00:19:26 2019//
-/swap.h/1.7/Mon Sep 30 12:02:30 2013//
-/syscall.h/1.215/Wed Mar 18 19:35:00 2020//
-/syscall_mi.h/1.25/Tue Jan 21 16:16:23 2020//
-/syscallargs.h/1.218/Wed Mar 18 19:35:00 2020//
-/sysctl.h/1.205/Fri Mar 13 10:07:01 2020//
-/syslimits.h/1.14/Thu Apr 2 18:00:00 2020//
-/syslog.h/1.16/Tue Aug 8 14:23:23 2017//
-/systm.h/1.145/Fri Mar 20 03:37:08 2020//
-/task.h/1.16/Sun Jun 23 12:56:10 2019//
-/termios.h/1.13/Tue Sep 20 21:10:22 2016//
-/time.h/1.50/Wed Jan 15 13:17:35 2020//
-/timeout.h/1.36/Fri Jan 3 02:16:38 2020//
-/times.h/1.6/Sat Jul 6 18:44:21 2013//
-/timetc.h/1.10/Sat Oct 26 21:16:38 2019//
-/tprintf.h/1.6/Sun Aug 24 01:27:07 2003//
-/tracepoint.h/1.1/Tue Jan 21 16:16:23 2020//
-/tree.h/1.29/Sun Jul 30 19:27:20 2017//
-/tty.h/1.38/Fri Jul 19 00:17:16 2019//
-/ttycom.h/1.17/Sat Jun 16 13:55:03 2018//
-/ttydefaults.h/1.7/Tue Mar 12 11:01:25 2019//
-/types.h/1.48/Sat Feb 9 04:54:11 2019//
-/ucred.h/1.13/Thu Jun 21 13:58:21 2018//
-/uio.h/1.19/Mon Aug 20 16:00:22 2018//
-/un.h/1.14/Sat Jul 18 15:00:01 2015//
-/unistd.h/1.31/Mon Jul 20 00:56:10 2015//
-/unpcb.h/1.17/Mon Jul 15 12:28:06 2019//
-/user.h/1.9/Tue Jul 8 23:31:22 2014//
-/utsname.h/1.6/Sun Mar 24 17:45:50 2013//
-/uuid.h/1.3/Sun Aug 31 09:36:39 2014//
-/varargs.h/1.3/Sat Dec 7 06:55:20 2019//
-/videoio.h/1.16/Fri Feb 17 06:48:33 2017//
-/vmmeter.h/1.15/Wed Jul 27 14:44:59 2016//
-/vnode.h/1.156/Wed Apr 8 08:07:52 2020//
-/wait.h/1.17/Fri Jun 13 22:40:31 2014//
-/witness.h/1.5/Tue Apr 23 13:35:12 2019//
+/_endian.h/1.8/Thu Jan 11 23:13:37 2018//TOPENBSD_6_8
+/_lock.h/1.4/Tue Apr 23 13:35:12 2019//TOPENBSD_6_8
+/_null.h/1.2/Fri Sep 9 22:07:58 2016//TOPENBSD_6_8
+/_time.h/1.9/Mon Dec 18 05:51:53 2017//TOPENBSD_6_8
+/_types.h/1.9/Fri Aug 22 23:05:15 2014//TOPENBSD_6_8
+/acct.h/1.9/Mon Sep 9 20:02:26 2019//TOPENBSD_6_8
+/ataio.h/1.5/Fri Sep 26 21:43:32 2003//TOPENBSD_6_8
+/atomic.h/1.6/Sat Mar 9 06:14:21 2019//TOPENBSD_6_8
+/audioio.h/1.27/Wed Sep 14 06:12:20 2016//TOPENBSD_6_8
+/buf.h/1.112/Fri Nov 29 01:04:08 2019//TOPENBSD_6_8
+/cdefs.h/1.43/Mon Oct 29 17:10:40 2018//TOPENBSD_6_8
+/cdio.h/1.17/Tue Oct 24 09:36:13 2017//TOPENBSD_6_8
+/chio.h/1.7/Wed May 31 03:01:44 2006//TOPENBSD_6_8
+/conf.h/1.155/Mon Jul 6 04:11:26 2020//TOPENBSD_6_8
+/core.h/1.7/Sat Sep 17 06:09:08 2016//TOPENBSD_6_8
+/ctf.h/1.5/Sun Aug 13 14:56:05 2017//TOPENBSD_6_8
+/device.h/1.55/Mon Sep 10 16:18:34 2018//TOPENBSD_6_8
+/dir.h/1.5/Mon Jun 2 23:28:21 2003//TOPENBSD_6_8
+/dirent.h/1.11/Fri Dec 13 18:09:27 2013//TOPENBSD_6_8
+/disk.h/1.36/Thu May 4 22:47:27 2017//TOPENBSD_6_8
+/disklabel.h/1.76/Sun May 10 00:56:06 2020//TOPENBSD_6_8
+/dkio.h/1.12/Tue Oct 24 09:36:13 2017//TOPENBSD_6_8
+/domain.h/1.20/Thu Jun 13 08:12:11 2019//TOPENBSD_6_8
+/endian.h/1.25/Sun Dec 21 04:49:00 2014//TOPENBSD_6_8
+/errno.h/1.25/Tue Sep 5 03:06:26 2017//TOPENBSD_6_8
+/evcount.h/1.3/Mon Sep 20 06:33:46 2010//TOPENBSD_6_8
+/event.h/1.45/Sun Aug 23 07:05:29 2020//TOPENBSD_6_8
+/eventvar.h/1.9/Tue Apr 7 13:27:52 2020//TOPENBSD_6_8
+/exec.h/1.42/Sun Jun 28 09:29:57 2020//TOPENBSD_6_8
+/exec_elf.h/1.88/Mon Jul 6 13:33:09 2020//TOPENBSD_6_8
+/exec_script.h/1.6/Wed Feb 7 20:31:57 2018//TOPENBSD_6_8
+/extent.h/1.14/Sat Feb 8 20:29:01 2014//TOPENBSD_6_8
+/fcntl.h/1.22/Mon Jan 21 18:09:21 2019//TOPENBSD_6_8
+/file.h/1.61/Fri Mar 13 10:07:01 2020//TOPENBSD_6_8
+/filedesc.h/1.45/Sat Jul 4 08:06:08 2020//TOPENBSD_6_8
+/filio.h/1.5/Fri Jun 1 22:30:48 2007//TOPENBSD_6_8
+/fusebuf.h/1.13/Tue Jun 19 11:27:54 2018//TOPENBSD_6_8
+/futex.h/1.2/Sun Jun 3 15:09:26 2018//TOPENBSD_6_8
+/gmon.h/1.8/Sat May 7 19:30:52 2016//TOPENBSD_6_8
+/gpio.h/1.8/Mon Oct 3 20:24:51 2011//TOPENBSD_6_8
+/hibernate.h/1.42/Thu Jun 21 07:33:30 2018//TOPENBSD_6_8
+/hotplug.h/1.5/Sun May 28 16:52:34 2006//TOPENBSD_6_8
+/intrmap.h/1.3/Tue Jun 23 01:40:03 2020//TOPENBSD_6_8
+/ioccom.h/1.5/Fri Mar 22 21:22:05 2013//TOPENBSD_6_8
+/ioctl.h/1.17/Sun Feb 28 15:46:19 2016//TOPENBSD_6_8
+/ipc.h/1.13/Sat Nov 15 21:42:50 2014//TOPENBSD_6_8
+/kcore.h/1.1/Thu Apr 18 21:40:57 1996//TOPENBSD_6_8
+/kcov.h/1.7/Sat Sep 26 11:59:59 2020//TOPENBSD_6_8
+/kernel.h/1.23/Wed May 20 17:24:17 2020//TOPENBSD_6_8
+/kstat.h/1.1/Mon Jul 6 03:56:51 2020//TOPENBSD_6_8
+/kthread.h/1.7/Tue Feb 18 12:13:40 2020//TOPENBSD_6_8
+/ktrace.h/1.39/Mon Sep 14 07:15:25 2020//TOPENBSD_6_8
+/limits.h/1.10/Sat Jun 30 20:21:10 2012//TOPENBSD_6_8
+/lock.h/1.27/Sun Jun 19 11:54:33 2016//TOPENBSD_6_8
+/lockf.h/1.17/Sat Apr 20 08:28:59 2019//TOPENBSD_6_8
+/malloc.h/1.119/Thu Nov 28 16:23:11 2019//TOPENBSD_6_8
+/mbuf.h/1.250/Sat Aug 8 19:53:02 2020//TOPENBSD_6_8
+/memrange.h/1.10/Tue Aug 18 20:19:32 2015//TOPENBSD_6_8
+/mman.h/1.34/Fri Mar 1 01:46:18 2019//TOPENBSD_6_8
+/mount.h/1.147/Sat Jan 18 08:40:19 2020//TOPENBSD_6_8
+/mplock.h/1.13/Tue Apr 23 13:35:12 2019//TOPENBSD_6_8
+/msg.h/1.19/Sun Nov 23 04:31:42 2014//TOPENBSD_6_8
+/msgbuf.h/1.12/Tue Aug 18 13:38:24 2020//TOPENBSD_6_8
+/mtio.h/1.9/Fri Jun 1 18:44:48 2007//TOPENBSD_6_8
+/mutex.h/1.18/Tue Apr 23 13:35:12 2019//TOPENBSD_6_8
+/namei.h/1.45/Thu Mar 19 13:55:20 2020//TOPENBSD_6_8
+/param.h/1.131/Mon Aug 31 16:08:28 2020//TOPENBSD_6_8
+/pciio.h/1.8/Mon Jun 22 04:11:37 2020//TOPENBSD_6_8
+/percpu.h/1.8/Tue Aug 28 15:15:02 2018//TOPENBSD_6_8
+/pipe.h/1.27/Mon Jun 29 18:23:18 2020//TOPENBSD_6_8
+/pledge.h/1.41/Sun Apr 5 07:31:45 2020//TOPENBSD_6_8
+/poll.h/1.15/Tue Jun 7 06:12:37 2016//TOPENBSD_6_8
+/pool.h/1.77/Fri Jul 19 09:03:03 2019//TOPENBSD_6_8
+/proc.h/1.300/Wed Sep 16 08:01:15 2020//TOPENBSD_6_8
+/protosw.h/1.31/Tue Jan 23 20:49:58 2018//TOPENBSD_6_8
+/ptrace.h/1.16/Mon Mar 16 11:58:46 2020//TOPENBSD_6_8
+/queue.h/1.45/Thu Jul 12 14:22:54 2018//TOPENBSD_6_8
+/radioio.h/1.5/Wed Jan 14 21:15:36 2015//TOPENBSD_6_8
+/reboot.h/1.19/Sat May 23 00:40:53 2020//TOPENBSD_6_8
+/refcnt.h/1.4/Tue Jun 7 07:53:33 2016//TOPENBSD_6_8
+/resource.h/1.14/Fri Oct 25 04:42:48 2013//TOPENBSD_6_8
+/resourcevar.h/1.24/Fri Jun 21 09:39:48 2019//TOPENBSD_6_8
+/rwlock.h/1.26/Tue Jul 16 01:40:49 2019//TOPENBSD_6_8
+/sched.h/1.56/Mon Oct 21 10:24:01 2019//TOPENBSD_6_8
+/scsiio.h/1.10/Wed Sep 5 17:17:47 2012//TOPENBSD_6_8
+/select.h/1.17/Mon Sep 12 19:41:20 2016//TOPENBSD_6_8
+/selinfo.h/1.5/Tue Jul 18 19:20:26 2017//TOPENBSD_6_8
+/sem.h/1.24/Thu Sep 1 08:33:40 2016//TOPENBSD_6_8
+/sensors.h/1.37/Wed Jul 15 07:13:57 2020//TOPENBSD_6_8
+/shm.h/1.29/Sun Nov 3 20:16:01 2019//TOPENBSD_6_8
+/siginfo.h/1.12/Fri Apr 7 04:48:44 2017//TOPENBSD_6_8
+/sigio.h/1.4/Wed Jan 8 16:27:42 2020//TOPENBSD_6_8
+/signal.h/1.29/Wed Apr 18 16:05:20 2018//TOPENBSD_6_8
+/signalvar.h/1.44/Wed Sep 16 13:50:42 2020//TOPENBSD_6_8
+/smr.h/1.7/Wed Jun 17 14:12:19 2020//TOPENBSD_6_8
+/socket.h/1.98/Mon Jul 22 15:34:07 2019//TOPENBSD_6_8
+/socketvar.h/1.91/Wed Jan 15 13:17:35 2020//TOPENBSD_6_8
+/sockio.h/1.83/Wed Nov 13 11:54:01 2019//TOPENBSD_6_8
+/specdev.h/1.39/Fri Dec 27 22:17:01 2019//TOPENBSD_6_8
+/srp.h/1.15/Sat May 9 10:18:27 2020//TOPENBSD_6_8
+/stacktrace.h/1.3/Sat Apr 18 04:45:20 2020//TOPENBSD_6_8
+/stat.h/1.28/Sat Apr 4 18:06:08 2015//TOPENBSD_6_8
+/statvfs.h/1.3/Sun Mar 24 17:45:50 2013//TOPENBSD_6_8
+/stdarg.h/1.10/Tue Jul 21 23:09:00 2020//TOPENBSD_6_8
+/stdint.h/1.11/Fri Jan 25 00:19:26 2019//TOPENBSD_6_8
+/swap.h/1.7/Mon Sep 30 12:02:30 2013//TOPENBSD_6_8
+/syscall.h/1.215/Wed Mar 18 19:35:00 2020//TOPENBSD_6_8
+/syscall_mi.h/1.25/Tue Jan 21 16:16:23 2020//TOPENBSD_6_8
+/syscallargs.h/1.218/Wed Mar 18 19:35:00 2020//TOPENBSD_6_8
+/sysctl.h/1.211/Tue Sep 1 01:53:50 2020//TOPENBSD_6_8
+/syslimits.h/1.14/Thu Apr 2 18:00:00 2020//TOPENBSD_6_8
+/syslog.h/1.17/Thu May 21 01:39:56 2020//TOPENBSD_6_8
+/systm.h/1.148/Wed Aug 26 03:29:07 2020//TOPENBSD_6_8
+/task.h/1.18/Sat Aug 1 08:40:20 2020//TOPENBSD_6_8
+/termios.h/1.13/Tue Sep 20 21:10:22 2016//TOPENBSD_6_8
+/time.h/1.55/Mon Jul 6 13:33:09 2020//TOPENBSD_6_8
+/timeout.h/1.39/Fri Aug 7 00:45:25 2020//TOPENBSD_6_8
+/times.h/1.6/Sat Jul 6 18:44:21 2013//TOPENBSD_6_8
+/timetc.h/1.12/Mon Jul 6 13:33:09 2020//TOPENBSD_6_8
+/tprintf.h/1.6/Sun Aug 24 01:27:07 2003//TOPENBSD_6_8
+/tracepoint.h/1.1/Tue Jan 21 16:16:23 2020//TOPENBSD_6_8
+/tree.h/1.29/Sun Jul 30 19:27:20 2017//TOPENBSD_6_8
+/tty.h/1.39/Tue Jul 14 14:33:06 2020//TOPENBSD_6_8
+/ttycom.h/1.17/Sat Jun 16 13:55:03 2018//TOPENBSD_6_8
+/ttydefaults.h/1.7/Tue Mar 12 11:01:25 2019//TOPENBSD_6_8
+/types.h/1.48/Sat Feb 9 04:54:11 2019//TOPENBSD_6_8
+/ucred.h/1.13/Thu Jun 21 13:58:21 2018//TOPENBSD_6_8
+/uio.h/1.19/Mon Aug 20 16:00:22 2018//TOPENBSD_6_8
+/un.h/1.14/Sat Jul 18 15:00:01 2015//TOPENBSD_6_8
+/unistd.h/1.31/Mon Jul 20 00:56:10 2015//TOPENBSD_6_8
+/unpcb.h/1.17/Mon Jul 15 12:28:06 2019//TOPENBSD_6_8
+/user.h/1.9/Tue Jul 8 23:31:22 2014//TOPENBSD_6_8
+/utsname.h/1.6/Sun Mar 24 17:45:50 2013//TOPENBSD_6_8
+/uuid.h/1.3/Sun Aug 31 09:36:39 2014//TOPENBSD_6_8
+/varargs.h/1.4/Tue Jul 21 23:09:00 2020//TOPENBSD_6_8
+/videoio.h/1.16/Fri Feb 17 06:48:33 2017//TOPENBSD_6_8
+/vmmeter.h/1.15/Wed Jul 27 14:44:59 2016//TOPENBSD_6_8
+/vnode.h/1.156/Wed Apr 8 08:07:52 2020//TOPENBSD_6_8
+/wait.h/1.17/Fri Jun 13 22:40:31 2014//TOPENBSD_6_8
+/witness.h/1.5/Tue Apr 23 13:35:12 2019//TOPENBSD_6_8
D
diff --git a/sys/sys/CVS/Tag b/sys/sys/CVS/Tag
new file mode 100644
index 0000000..b10ca19
--- /dev/null
+++ b/sys/sys/CVS/Tag
@@ -0,0 +1 @@
+TOPENBSD_6_8
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index 48470a0..7478aa7 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.h,v 1.150 2020/04/21 08:29:27 mpi Exp $ */
+/* $OpenBSD: conf.h,v 1.155 2020/07/06 04:11:26 dlg Exp $ */
/* $NetBSD: conf.h,v 1.33 1996/05/03 20:03:32 christos Exp $ */
/*-
@@ -200,7 +200,7 @@ extern struct cdevsw cdevsw[];
(dev_type_open((*))) enodev, (dev_type_close((*))) enodev, \
(dev_type_read((*))) enodev, (dev_type_write((*))) enodev, \
(dev_type_ioctl((*))) enodev, (dev_type_stop((*))) enodev, \
- 0, seltrue, (dev_type_mmap((*))) enodev }
+ 0, seltrue, (dev_type_mmap((*))) enodev, 0, 0, seltrue_kqfilter }
/* open, close, read, write, ioctl, poll, kqfilter -- XXX should be a tty */
#define cdev_cn_init(c,n) { \
@@ -312,7 +312,7 @@ extern struct cdevsw cdevsw[];
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
dev_init(c,n,write), dev_init(c,n,ioctl), \
(dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
- (dev_type_mmap((*))) enodev }
+ (dev_type_mmap((*))) enodev, 0, 0, dev_init(c,n,kqfilter) }
/* open, close, read, write, ioctl, poll, kqfilter */
#define cdev_midi_init(c,n) { \
@@ -328,6 +328,13 @@ extern struct cdevsw cdevsw[];
(dev_type_stop((*))) enodev, 0, seltrue, \
(dev_type_mmap((*))) enodev, 0, 0, seltrue_kqfilter }
+/* open, close, ioctl */
+#define cdev_kstat_init(c,n) { \
+ dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
+ (dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
+ (dev_type_stop((*))) enodev, 0, selfalse, \
+ (dev_type_mmap((*))) enodev }
+
/* open, close, read, write, ioctl, stop, tty, poll, mmap, kqfilter */
#define cdev_wsdisplay_init(c,n) { \
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
@@ -390,12 +397,12 @@ extern struct cdevsw cdevsw[];
(dev_type_stop((*))) enodev, 0, selfalse, \
(dev_type_mmap((*))) enodev }
-/* open, close, ioctl, read, mmap, poll */
+/* open, close, ioctl, read, mmap, poll, kqfilter */
#define cdev_video_init(c,n) { \
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
(dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
- dev_init(c,n,mmap) }
+ dev_init(c,n,mmap), 0, 0, dev_init(c,n,kqfilter) }
/* open, close, write, ioctl */
#define cdev_spkr_init(c,n) { \
@@ -473,8 +480,8 @@ extern struct cdevsw cdevsw[];
#define cdev_ipmi_init(c,n) { \
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
- (dev_type_stop((*))) enodev, 0, selfalse, \
- (dev_type_mmap((*))) enodev, 0 }
+ (dev_type_stop((*))) enodev, 0, seltrue, (dev_type_mmap((*))) enodev, \
+ 0, 0, seltrue_kqfilter }
/* open, close, ioctl, mmap */
#define cdev_kcov_init(c,n) { \
@@ -605,6 +612,7 @@ cdev_decl(wsmouse);
cdev_decl(wsmux);
cdev_decl(ksyms);
+cdev_decl(kstat);
cdev_decl(bio);
cdev_decl(vscsi);
diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h
index 70c6cfe..0d13a3f 100644
--- a/sys/sys/disklabel.h
+++ b/sys/sys/disklabel.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: disklabel.h,v 1.75 2017/10/24 09:36:13 jsg Exp $ */
+/* $OpenBSD: disklabel.h,v 1.76 2020/05/10 00:56:06 guenther Exp $ */
/* $NetBSD: disklabel.h,v 1.41 1996/05/10 23:07:37 mark Exp $ */
/*
@@ -156,37 +156,37 @@ struct __partitionv0 { /* old (v0) partition table entry */
#define DL_GETPSIZE(p) (((u_int64_t)(p)->p_sizeh << 32) + (p)->p_size)
#define DL_SETPSIZE(p, n) do { \
- u_int64_t x = (n); \
- (p)->p_sizeh = x >> 32; \
- (p)->p_size = x; \
+ u_int64_t __x = (n); \
+ (p)->p_sizeh = __x >> 32; \
+ (p)->p_size = __x; \
} while (0)
#define DL_GETPOFFSET(p) (((u_int64_t)(p)->p_offseth << 32) + (p)->p_offset)
#define DL_SETPOFFSET(p, n) do { \
- u_int64_t x = (n); \
- (p)->p_offseth = x >> 32; \
- (p)->p_offset = x; \
+ u_int64_t __x = (n); \
+ (p)->p_offseth = __x >> 32; \
+ (p)->p_offset = __x; \
} while (0)
#define DL_GETDSIZE(d) (((u_int64_t)(d)->d_secperunith << 32) + \
(d)->d_secperunit)
#define DL_SETDSIZE(d, n) do { \
- u_int64_t x = (n); \
- (d)->d_secperunith = x >> 32; \
- (d)->d_secperunit = x; \
+ u_int64_t __x = (n); \
+ (d)->d_secperunith = __x >> 32; \
+ (d)->d_secperunit = __x; \
} while (0)
#define DL_GETBSTART(d) (((u_int64_t)(d)->d_bstarth << 32) + \
(d)->d_bstart)
#define DL_SETBSTART(d, n) do { \
- u_int64_t x = (n); \
- (d)->d_bstarth = x >> 32; \
- (d)->d_bstart = x; \
+ u_int64_t __x = (n); \
+ (d)->d_bstarth = __x >> 32; \
+ (d)->d_bstart = __x; \
} while (0)
#define DL_GETBEND(d) (((u_int64_t)(d)->d_bendh << 32) + \
(d)->d_bend)
#define DL_SETBEND(d, n) do { \
- u_int64_t x = (n); \
- (d)->d_bendh = x >> 32; \
- (d)->d_bend = x; \
+ u_int64_t __x = (n); \
+ (d)->d_bendh = __x >> 32; \
+ (d)->d_bend = __x; \
} while (0)
#define DL_BLKSPERSEC(d) ((d)->d_secsize / DEV_BSIZE)
diff --git a/sys/sys/event.h b/sys/sys/event.h
index 2c345f3..fefbfcc 100644
--- a/sys/sys/event.h
+++ b/sys/sys/event.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: event.h,v 1.35 2020/04/07 13:27:52 visa Exp $ */
+/* $OpenBSD: event.h,v 1.45 2020/08/23 07:05:29 mpi Exp $ */
/*-
* Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org>
@@ -39,8 +39,9 @@
#define EVFILT_SIGNAL (-6) /* attached to struct process */
#define EVFILT_TIMER (-7) /* timers */
#define EVFILT_DEVICE (-8) /* devices */
+#define EVFILT_EXCEPT (-9) /* exceptional conditions */
-#define EVFILT_SYSCOUNT 8
+#define EVFILT_SYSCOUNT 9
#define EV_SET(kevp, a, b, c, d, e, f) do { \
struct kevent *__kevp = (kevp); \
@@ -87,6 +88,12 @@ struct kevent {
#define NOTE_EOF 0x0002 /* return on EOF */
/*
+ * data/hint flags for EVFILT_EXCEPT, shared with userspace and with
+ * EVFILT_{READ|WRITE}
+ */
+#define NOTE_OOB 0x0004 /* OOB data on a socket */
+
+/*
* data/hint flags for EVFILT_VNODE, shared with userspace
*/
#define NOTE_DELETE 0x0001 /* vnode was removed */
@@ -129,6 +136,10 @@ struct klist {
#ifdef _KERNEL
+/* kernel-only flags */
+#define __EV_POLL 0x1000 /* match behavior of poll & select */
+#define __EV_HUP EV_FLAG1 /* device or socket disconnected */
+
#define EVFILT_MARKER 0xf /* placemarker for tailq */
/*
@@ -136,10 +147,10 @@ struct klist {
*/
#define NOTE_SUBMIT 0x01000000 /* initial knote submission */
-#define KNOTE(list_, hint) do { \
- struct klist *list = (list_); \
- if ((list) != NULL) \
- knote((list), (hint)); \
+#define KNOTE(list, hint) do { \
+ struct klist *__list = (list); \
+ if (__list != NULL) \
+ knote(__list, hint); \
} while (0)
#define KN_HASHSIZE 64 /* XXX should be tunable */
@@ -192,6 +203,7 @@ struct knote {
struct proc;
extern const struct filterops sig_filtops;
+extern const struct filterops dead_filtops;
extern void knote(struct klist *list, long hint);
extern void knote_activate(struct knote *);
diff --git a/sys/sys/exec.h b/sys/sys/exec.h
index ecaef3e..5158eb2 100644
--- a/sys/sys/exec.h
+++ b/sys/sys/exec.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.h,v 1.40 2019/11/29 06:34:46 deraadt Exp $ */
+/* $OpenBSD: exec.h,v 1.42 2020/06/28 09:29:57 kettenis Exp $ */
/* $NetBSD: exec.h,v 1.59 1996/02/09 18:25:09 christos Exp $ */
/*-
@@ -179,18 +179,18 @@ void new_vmcmd(struct exec_vmcmd_set *evsp,
#define NEW_VMCMD(evsp,proc,len,addr,vp,offset,prot) \
NEW_VMCMD2(evsp,proc,len,addr,vp,offset,prot,0)
#define NEW_VMCMD2(evsp,proc,len,addr,vp,offset,prot,flags) do { \
- struct exec_vmcmd *vcp; \
+ struct exec_vmcmd *__vcp; \
if ((evsp)->evs_used >= (evsp)->evs_cnt) \
vmcmdset_extend(evsp); \
- vcp = &(evsp)->evs_cmds[(evsp)->evs_used++]; \
- vcp->ev_proc = (proc); \
- vcp->ev_len = (len); \
- vcp->ev_addr = (addr); \
- if ((vcp->ev_vp = (vp)) != NULLVP) \
+ __vcp = &(evsp)->evs_cmds[(evsp)->evs_used++]; \
+ __vcp->ev_proc = (proc); \
+ __vcp->ev_len = (len); \
+ __vcp->ev_addr = (addr); \
+ if ((__vcp->ev_vp = (vp)) != NULLVP) \
vref(vp); \
- vcp->ev_offset = (offset); \
- vcp->ev_prot = (prot); \
- vcp->ev_flags = (flags); \
+ __vcp->ev_offset = (offset); \
+ __vcp->ev_prot = (prot); \
+ __vcp->ev_flags = (flags); \
} while (0)
#endif /* DEBUG */
@@ -288,6 +288,7 @@ struct exec {
#define MID_AMD64 157 /* AMD64 */
#define MID_MIPS64 158 /* big-endian MIPS64 */
#define MID_ARM64 159 /* ARM64 */
+#define MID_POWERPC64 160 /* big-endian 64-bit PowerPC */
#define MID_HP200 200 /* hp200 (68010) BSD binary */
#define MID_HP300 300 /* hp300 (68020+68881) BSD binary */
#define MID_HPUX 0x20C /* hp200/300 HP-UX binary */
diff --git a/sys/sys/exec_elf.h b/sys/sys/exec_elf.h
index a40e051..9a1dec6 100644
--- a/sys/sys/exec_elf.h
+++ b/sys/sys/exec_elf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_elf.h,v 1.87 2019/12/01 13:10:51 jsg Exp $ */
+/* $OpenBSD: exec_elf.h,v 1.88 2020/07/06 13:33:09 pirofti Exp $ */
/*
* Copyright (c) 1995, 1996 Erik Theisen. All rights reserved.
*
@@ -691,7 +691,8 @@ enum AuxID {
AUX_sun_uid = 2000, /* euid */
AUX_sun_ruid = 2001, /* ruid */
AUX_sun_gid = 2002, /* egid */
- AUX_sun_rgid = 2003 /* rgid */
+ AUX_sun_rgid = 2003, /* rgid */
+ AUX_openbsd_timekeep = 4000, /* userland clock_gettime */
};
struct elf_args {
diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h
index ef784f7..f332fb6 100644
--- a/sys/sys/filedesc.h
+++ b/sys/sys/filedesc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: filedesc.h,v 1.44 2020/01/30 15:33:04 visa Exp $ */
+/* $OpenBSD: filedesc.h,v 1.45 2020/07/04 08:06:08 anton Exp $ */
/* $NetBSD: filedesc.h,v 1.14 1996/04/09 20:55:28 cgd Exp $ */
/*
@@ -64,15 +64,15 @@ struct kqueue;
* a atomic operations
* f fd_lock
* f/w fd_lock when writing
- * k kernel lock
+ * K kernel lock
* m fd_fplock
*/
struct filedesc {
struct file **fd_ofiles; /* [f/w,m] file structures for
* open files */
char *fd_ofileflags; /* [f] per-process open file flags */
- struct vnode *fd_cdir; /* [k] current directory */
- struct vnode *fd_rdir; /* [k] root directory */
+ struct vnode *fd_cdir; /* [K] current directory */
+ struct vnode *fd_rdir; /* [K] root directory */
int fd_nfiles; /* [f] number of open files allocated */
int fd_openfd; /* [f] number of files currently open */
u_int *fd_himap; /* [f] each bit points to 32 fds */
@@ -80,7 +80,7 @@ struct filedesc {
int fd_lastfile; /* [f] high-water mark of fd_ofiles */
int fd_freefile; /* [f] approx. next free file */
u_short fd_cmask; /* [f/w] mask for file creation */
- u_short fd_refcnt; /* [k] reference count */
+ u_short fd_refcnt; /* [K] reference count */
struct rwlock fd_lock; /* lock for the file descs */
struct mutex fd_fplock; /* lock for reading fd_ofiles without
* fd_lock */
diff --git a/sys/sys/intrmap.h b/sys/sys/intrmap.h
new file mode 100644
index 0000000..f15711e
--- /dev/null
+++ b/sys/sys/intrmap.h
@@ -0,0 +1,39 @@
+/* $OpenBSD: intrmap.h,v 1.3 2020/06/23 01:40:03 dlg Exp $ */
+
+/*
+ * Copyright (c) 2020 David Gwynne <dlg@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _SYS_INTRMAP_H_
+#define _SYS_INTRMAP_H_
+
+struct intrmap;
+
+#define INTRMAP_POWEROF2 (1 << 0)
+
+struct intrmap *intrmap_create(const struct device *,
+ unsigned int, unsigned int, unsigned int);
+void intrmap_destroy(struct intrmap *);
+
+void intrmap_match(const struct device *,
+ struct intrmap *, struct intrmap *);
+void intrmap_align(const struct device *,
+ struct intrmap *, struct intrmap *);
+
+unsigned int intrmap_count(const struct intrmap *);
+struct cpu_info *intrmap_cpu(const struct intrmap *, unsigned int);
+struct cpu_info *intrmap_one(const struct device *);
+
+#endif /* _SYS_INTRMAP_H_ */
diff --git a/sys/sys/kcov.h b/sys/sys/kcov.h
index 717a5e8..a499953 100644
--- a/sys/sys/kcov.h
+++ b/sys/sys/kcov.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: kcov.h,v 1.4 2019/01/20 09:57:23 anton Exp $ */
+/* $OpenBSD: kcov.h,v 1.7 2020/09/26 11:59:59 anton Exp $ */
/*
* Copyright (c) 2018 Anton Lindqvist <anton@openbsd.org>
@@ -24,16 +24,28 @@
#define KIOSETBUFSIZE _IOW('K', 1, unsigned long)
#define KIOENABLE _IOW('K', 2, int)
#define KIODISABLE _IO('K', 3)
+#define KIOREMOTEATTACH _IOW('K', 4, struct kio_remote_attach *)
#define KCOV_MODE_NONE 0
#define KCOV_MODE_TRACE_PC 1
#define KCOV_MODE_TRACE_CMP 2
+#define KCOV_REMOTE_COMMON 0
+
+struct kio_remote_attach {
+ int subsystem;
+ int id;
+};
+
#ifdef _KERNEL
-#define KCOV_BUF_MAX_NMEMB (256 << 10)
+struct proc;
void kcov_exit(struct proc *);
+void kcov_remote_register(int, void *);
+void kcov_remote_unregister(int, void *);
+void kcov_remote_enter(int, void *);
+void kcov_remote_leave(int, void *);
#endif /* _KERNEL */
diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h
index f1c2aab..73aa8c3 100644
--- a/sys/sys/kernel.h
+++ b/sys/sys/kernel.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: kernel.h,v 1.22 2019/09/07 01:23:23 cheloha Exp $ */
+/* $OpenBSD: kernel.h,v 1.23 2020/05/20 17:24:17 cheloha Exp $ */
/* $NetBSD: kernel.h,v 1.11 1995/03/03 01:24:16 cgd Exp $ */
/*-
@@ -61,5 +61,3 @@ extern int profhz; /* profiling clock's frequency */
extern int lbolt; /* once a second sleep address */
extern int tickdelta;
extern long timedelta;
-
-extern struct bintime naptime; /* time spent suspended */
diff --git a/sys/sys/kstat.h b/sys/sys/kstat.h
new file mode 100644
index 0000000..4564810
--- /dev/null
+++ b/sys/sys/kstat.h
@@ -0,0 +1,193 @@
+/* $OpenBSD: kstat.h,v 1.1 2020/07/06 03:56:51 dlg Exp $ */
+
+/*
+ * Copyright (c) 2020 David Gwynne <dlg@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _SYS_KSTAT_H_
+#define _SYS_KSTAT_H_
+
+#include <sys/ioccom.h>
+
+#define KSTAT_STRLEN 32
+
+#define KSTAT_T_RAW 0
+#define KSTAT_T_KV 1
+#define KSTAT_T_COUNTERS 2
+
+struct kstat_req {
+ unsigned int ks_rflags;
+#define KSTATIOC_F_IGNVER (1 << 0)
+ /* the current version of the kstat subsystem */
+ unsigned int ks_version;
+
+ uint64_t ks_id;
+
+ char ks_provider[KSTAT_STRLEN];
+ unsigned int ks_instance;
+ char ks_name[KSTAT_STRLEN];
+ unsigned int ks_unit;
+
+ struct timespec ks_created;
+ struct timespec ks_updated;
+ struct timespec ks_interval;
+ unsigned int ks_type;
+ unsigned int ks_state;
+
+ void *ks_data;
+ size_t ks_datalen;
+ unsigned int ks_dataver;
+};
+
+/* ioctls */
+
+#define KSTATIOC_VERSION _IOR('k', 1, unsigned int)
+#define KSTATIOC_FIND_ID _IOWR('k', 2, struct kstat_req)
+#define KSTATIOC_NFIND_ID _IOWR('k', 3, struct kstat_req)
+#define KSTATIOC_FIND_PROVIDER _IOWR('k', 4, struct kstat_req)
+#define KSTATIOC_NFIND_PROVIDER _IOWR('k', 5, struct kstat_req)
+#define KSTATIOC_FIND_NAME _IOWR('k', 6, struct kstat_req)
+#define KSTATIOC_NFIND_NAME _IOWR('k', 7, struct kstat_req)
+
+/* named data */
+
+#define KSTAT_KV_NAMELEN 16
+#define KSTAT_KV_ALIGN sizeof(uint64_t)
+
+enum kstat_kv_type {
+ KSTAT_KV_T_NULL,
+ KSTAT_KV_T_BOOL,
+ KSTAT_KV_T_COUNTER64,
+ KSTAT_KV_T_COUNTER32,
+ KSTAT_KV_T_UINT64,
+ KSTAT_KV_T_INT64,
+ KSTAT_KV_T_UINT32,
+ KSTAT_KV_T_INT32,
+ KSTAT_KV_T_ISTR, /* inline string */
+ KSTAT_KV_T_STR, /* trailing string */
+ KSTAT_KV_T_BYTES, /* trailing bytes */
+ KSTAT_KV_T_TEMP, /* temperature (uK) */
+};
+
+/* units only apply to integer types */
+enum kstat_kv_unit {
+ KSTAT_KV_U_NONE = 0,
+ KSTAT_KV_U_PACKETS, /* packets */
+ KSTAT_KV_U_BYTES, /* bytes */
+ KSTAT_KV_U_CYCLES, /* cycles */
+};
+
+struct kstat_kv {
+ char kv_key[KSTAT_KV_NAMELEN];
+ union {
+ char v_istr[16];
+ unsigned int v_bool;
+ uint64_t v_u64;
+ int64_t v_s64;
+ uint32_t v_u32;
+ int32_t v_s32;
+ size_t v_len;
+ } kv_v;
+ enum kstat_kv_type kv_type;
+ enum kstat_kv_unit kv_unit;
+} __aligned(KSTAT_KV_ALIGN);
+
+#define kstat_kv_istr(_kv) (_kv)->kv_v.v_istr
+#define kstat_kv_bool(_kv) (_kv)->kv_v.v_bool
+#define kstat_kv_u64(_kv) (_kv)->kv_v.v_u64
+#define kstat_kv_s64(_kv) (_kv)->kv_v.v_s64
+#define kstat_kv_u32(_kv) (_kv)->kv_v.v_u32
+#define kstat_kv_s32(_kv) (_kv)->kv_v.v_s32
+#define kstat_kv_len(_kv) (_kv)->kv_v.v_len
+#define kstat_kv_temp(_kv) (_kv)->kv_v.v_u64
+
+#ifdef _KERNEL
+
+#include <sys/tree.h>
+
+struct kstat_lock_ops;
+
+struct kstat {
+ uint64_t ks_id;
+
+ const char *ks_provider;
+ unsigned int ks_instance;
+ const char *ks_name;
+ unsigned int ks_unit;
+
+ unsigned int ks_type;
+ unsigned int ks_flags;
+#define KSTAT_F_REALLOC (1 << 0)
+ unsigned int ks_state;
+#define KSTAT_S_CREATED 0
+#define KSTAT_S_INSTALLED 1
+
+ struct timespec ks_created;
+ RBT_ENTRY(kstat) ks_id_entry;
+ RBT_ENTRY(kstat) ks_pv_entry;
+ RBT_ENTRY(kstat) ks_nm_entry;
+
+ /* the driver can update these between kstat creation and install */
+ unsigned int ks_dataver;
+ void *ks_softc;
+ void *ks_ptr;
+ int (*ks_read)(struct kstat *);
+ int (*ks_copy)(struct kstat *, void *);
+
+ const struct kstat_lock_ops *
+ ks_lock_ops;
+ void *ks_lock;
+
+ /* the data that is updated by ks_read */
+ void *ks_data;
+ size_t ks_datalen;
+ struct timespec ks_updated;
+ struct timespec ks_interval;
+};
+
+struct kstat *kstat_create(const char *, unsigned int,
+ const char *, unsigned int,
+ unsigned int, unsigned int);
+
+void kstat_set_rlock(struct kstat *, struct rwlock *);
+void kstat_set_wlock(struct kstat *, struct rwlock *);
+void kstat_set_mutex(struct kstat *, struct mutex *);
+void kstat_set_cpu(struct kstat *, struct cpu_info *);
+
+int kstat_read_nop(struct kstat *);
+
+void kstat_install(struct kstat *);
+void kstat_destroy(struct kstat *);
+
+/*
+ * kstat_kv api
+ */
+
+#define KSTAT_KV_UNIT_INITIALIZER(_key, _type, _unit) { \
+ .kv_key = (_key), \
+ .kv_type = (_type), \
+ .kv_unit = (_unit), \
+}
+
+#define KSTAT_KV_INITIALIZER(_key, _type) \
+ KSTAT_KV_UNIT_INITIALIZER((_key), (_type), KSTAT_KV_U_NONE)
+
+void kstat_kv_init(struct kstat_kv *, const char *, enum kstat_kv_type);
+void kstat_kv_unit_init(struct kstat_kv *, const char *,
+ enum kstat_kv_type, enum kstat_kv_unit);
+
+#endif /* _KERNEL */
+
+#endif /* _SYS_KSTAT_H_ */
diff --git a/sys/sys/ktrace.h b/sys/sys/ktrace.h
index c6a41cf..78bd64d 100644
--- a/sys/sys/ktrace.h
+++ b/sys/sys/ktrace.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ktrace.h,v 1.38 2019/02/26 22:24:41 deraadt Exp $ */
+/* $OpenBSD: ktrace.h,v 1.39 2020/09/14 07:15:25 mpi Exp $ */
/* $NetBSD: ktrace.h,v 1.12 1996/02/04 02:12:29 christos Exp $ */
/*
@@ -164,7 +164,7 @@ struct ktr_pledge {
};
/*
- * kernel trace points (in p_traceflag)
+ * kernel trace points (in ps_traceflag)
*/
#define KTRFAC_MASK 0x00ffffff
#define KTRFAC_SYSCALL (1<<KTR_SYSCALL)
@@ -179,7 +179,7 @@ struct ktr_pledge {
#define KTRFAC_PLEDGE (1<<KTR_PLEDGE)
/*
- * trace flags (also in p_traceflags)
+ * trace flags (also in ps_traceflag)
*/
#define KTRFAC_ROOT 0x80000000U /* root set this trace */
#define KTRFAC_INHERIT 0x40000000 /* pass trace flags to children */
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index a54b003..5b1c711 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mbuf.h,v 1.246 2020/01/22 22:56:35 dlg Exp $ */
+/* $OpenBSD: mbuf.h,v 1.250 2020/08/08 19:53:02 florian Exp $ */
/* $NetBSD: mbuf.h,v 1.19 1996/02/09 18:25:14 christos Exp $ */
/*
@@ -190,7 +190,6 @@ struct mbuf {
/* mbuf pkthdr flags, also in m_flags */
#define M_VLANTAG 0x0020 /* ether_vtag is valid */
#define M_LOOP 0x0040 /* packet has been sent from local machine */
-#define M_ACAST 0x0080 /* received as IPv6 anycast */
#define M_BCAST 0x0100 /* sent/received as link-level broadcast */
#define M_MCAST 0x0200 /* sent/received as link-level multicast */
#define M_CONF 0x0400 /* payload was encrypted (ESP-transport) */
@@ -203,14 +202,13 @@ struct mbuf {
#ifdef _KERNEL
#define M_BITS \
("\20\1M_EXT\2M_PKTHDR\3M_EOR\4M_EXTWR\5M_PROTO1\6M_VLANTAG\7M_LOOP" \
- "\10M_ACAST\11M_BCAST\12M_MCAST\13M_CONF\14M_AUTH\15M_TUNNEL" \
+ "\11M_BCAST\12M_MCAST\13M_CONF\14M_AUTH\15M_TUNNEL" \
"\16M_ZEROIZE\17M_COMP\20M_LINK0")
#endif
/* flags copied when copying m_pkthdr */
#define M_COPYFLAGS (M_PKTHDR|M_EOR|M_PROTO1|M_BCAST|M_MCAST|M_CONF|M_COMP|\
- M_AUTH|M_LOOP|M_TUNNEL|M_LINK0|M_VLANTAG|M_ACAST|\
- M_ZEROIZE)
+ M_AUTH|M_LOOP|M_TUNNEL|M_LINK0|M_VLANTAG|M_ZEROIZE)
/* Checksumming flags */
#define M_IPV4_CSUM_OUT 0x0001 /* IPv4 checksum needed */
@@ -227,13 +225,14 @@ struct mbuf {
#define M_ICMP_CSUM_IN_BAD 0x0800 /* ICMP/ICMPv6 checksum bad */
#define M_IPV6_DF_OUT 0x1000 /* don't fragment outgoing IPv6 */
#define M_TIMESTAMP 0x2000 /* ph_timestamp is set */
+#define M_FLOWID 0x4000 /* ph_flowid is set */
#ifdef _KERNEL
#define MCS_BITS \
("\20\1IPV4_CSUM_OUT\2TCP_CSUM_OUT\3UDP_CSUM_OUT\4IPV4_CSUM_IN_OK" \
"\5IPV4_CSUM_IN_BAD\6TCP_CSUM_IN_OK\7TCP_CSUM_IN_BAD\10UDP_CSUM_IN_OK" \
"\11UDP_CSUM_IN_BAD\12ICMP_CSUM_OUT\13ICMP_CSUM_IN_OK\14ICMP_CSUM_IN_BAD" \
- "\15IPV6_NODF_OUT" "\16TIMESTAMP")
+ "\15IPV6_NODF_OUT" "\16TIMESTAMP" "\17FLOWID")
#endif
/* mbuf types */
@@ -247,10 +246,6 @@ struct mbuf {
#define MT_OOBDATA 7 /* expedited data */
#define MT_NTYPES 8
-/* flowid field */
-#define M_FLOWID_VALID 0x8000 /* is the flowid set */
-#define M_FLOWID_MASK 0x7fff /* flow id to map to path */
-
/* flags to m_get/MGET */
#include <sys/malloc.h>
#define M_DONTWAIT M_NOWAIT
@@ -474,7 +469,7 @@ struct m_tag *m_tag_next(struct mbuf *, struct m_tag *);
/* Packet tag types */
#define PACKET_TAG_IPSEC_IN_DONE 0x0001 /* IPsec applied, in */
#define PACKET_TAG_IPSEC_OUT_DONE 0x0002 /* IPsec applied, out */
-#define PACKET_TAG_GIF 0x0040 /* GIF processing done */
+#define PACKET_TAG_WIREGUARD 0x0040 /* WireGuard data */
#define PACKET_TAG_GRE 0x0080 /* GRE processing done */
#define PACKET_TAG_DLT 0x0100 /* data link layer type */
#define PACKET_TAG_PF_DIVERT 0x0200 /* pf(4) diverted packet */
@@ -485,7 +480,7 @@ struct m_tag *m_tag_next(struct mbuf *, struct m_tag *);
#define MTAG_BITS \
("\20\1IPSEC_IN_DONE\2IPSEC_OUT_DONE\3IPSEC_IN_CRYPTO_DONE" \
- "\4IPSEC_OUT_CRYPTO_NEEDED\5IPSEC_PENDING_TDB\6BRIDGE\7GIF\10GRE\11DLT" \
+ "\4IPSEC_OUT_CRYPTO_NEEDED\5IPSEC_PENDING_TDB\6BRIDGE\7WG\10GRE\11DLT" \
"\12PF_DIVERT\14PF_REASSEMBLED\15SRCROUTE\16TUNNEL\17CARP_BAL_IP")
/*
@@ -494,7 +489,7 @@ struct m_tag *m_tag_next(struct mbuf *, struct m_tag *);
* length for an existing packet tag type or when adding a new one that
* has payload larger than the value below.
*/
-#define PACKET_TAG_MAXSIZE 60
+#define PACKET_TAG_MAXSIZE 80
/* Detect mbufs looping in the kernel when spliced too often. */
#define M_MAXLOOP 128
@@ -532,6 +527,7 @@ unsigned int ml_hdatalen(struct mbuf_list *);
{ MUTEX_INITIALIZER(_ipl), MBUF_LIST_INITIALIZER(), (_maxlen), 0 }
void mq_init(struct mbuf_queue *, u_int, int);
+int mq_push(struct mbuf_queue *, struct mbuf *);
int mq_enqueue(struct mbuf_queue *, struct mbuf *);
struct mbuf * mq_dequeue(struct mbuf_queue *);
int mq_enlist(struct mbuf_queue *, struct mbuf_list *);
diff --git a/sys/sys/msgbuf.h b/sys/sys/msgbuf.h
index 3a53a5a..398304a 100644
--- a/sys/sys/msgbuf.h
+++ b/sys/sys/msgbuf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: msgbuf.h,v 1.11 2016/06/23 13:15:21 bluhm Exp $ */
+/* $OpenBSD: msgbuf.h,v 1.12 2020/08/18 13:38:24 visa Exp $ */
/* $NetBSD: msgbuf.h,v 1.8 1995/03/26 20:24:27 jtc Exp $ */
/*
@@ -38,7 +38,6 @@ struct msgbuf {
long msg_bufx; /* write pointer */
long msg_bufr; /* read pointer */
long msg_bufs; /* real msg_bufc size (bytes) */
- long msg_bufl; /* # chars, <= msg_bufs */
long msg_bufd; /* number of dropped bytes */
char msg_bufc[1]; /* buffer */
};
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 76c5e2f..579c4c9 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.130 2020/04/05 06:34:20 deraadt Exp $ */
+/* $OpenBSD: param.h,v 1.131 2020/08/31 16:08:28 deraadt Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@@ -41,8 +41,8 @@
#define BSD4_3 1
#define BSD4_4 1
-#define OpenBSD 202005 /* OpenBSD version (year & month). */
-#define OpenBSD6_7 1 /* OpenBSD 6.7 */
+#define OpenBSD 202010 /* OpenBSD version (year & month). */
+#define OpenBSD6_8 1 /* OpenBSD 6.8 */
#include <sys/_null.h>
diff --git a/sys/sys/pciio.h b/sys/sys/pciio.h
index 713e798..394dd08 100644
--- a/sys/sys/pciio.h
+++ b/sys/sys/pciio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pciio.h,v 1.7 2010/09/05 18:14:33 kettenis Exp $ */
+/* $OpenBSD: pciio.h,v 1.8 2020/06/22 04:11:37 dlg Exp $ */
/*-
* Copyright (c) 1997, Stefan Esser <se@FreeBSD.ORG>
@@ -54,6 +54,13 @@ struct pci_rom {
char *pr_rom;
};
+struct pci_vpd_req {
+ struct pcisel pv_sel;
+ int pv_offset;
+ int pv_count;
+ uint32_t *pv_data;
+};
+
struct pci_vga {
struct pcisel pv_sel;
int pv_lock;
@@ -74,5 +81,6 @@ struct pci_vga {
#define PCIOCGETVGA _IOWR('p', 6, struct pci_vga)
#define PCIOCSETVGA _IOWR('p', 7, struct pci_vga)
#define PCIOCREADMASK _IOWR('p', 8, struct pci_io)
+#define PCIOCGETVPD _IOWR('p', 9, struct pci_vpd_req)
#endif /* !_SYS_PCIIO_H_ */
diff --git a/sys/sys/pipe.h b/sys/sys/pipe.h
index d23f266..72822aa 100644
--- a/sys/sys/pipe.h
+++ b/sys/sys/pipe.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pipe.h,v 1.24 2020/01/24 11:07:41 anton Exp $ */
+/* $OpenBSD: pipe.h,v 1.27 2020/06/29 18:23:18 anton Exp $ */
/*
* Copyright (c) 1996 John S. Dyson
@@ -67,6 +67,8 @@ struct pipebuf {
#define PIPE_LOCK 0x100 /* Thread has exclusive I/O access. */
#define PIPE_LWANT 0x200 /* Thread wants exclusive I/O access. */
+struct pipe_pair;
+
/*
* Per-pipe data structure.
* Two of these are linked together to produce bi-directional pipes.
@@ -85,6 +87,7 @@ struct pipe {
struct timespec pipe_ctime; /* [I] time of status change */
struct sigio_ref pipe_sigio; /* [S] async I/O registration */
struct pipe *pipe_peer; /* [p] link with other direction */
+ struct pipe_pair *pipe_pair; /* [I] pipe storage */
u_int pipe_state; /* [p] pipe status info */
int pipe_busy; /* [p] # readers/writers */
};
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index 357c0c0..257175a 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc.h,v 1.295 2020/04/28 08:29:40 mpi Exp $ */
+/* $OpenBSD: proc.h,v 1.300 2020/09/16 08:01:15 mpi Exp $ */
/* $NetBSD: proc.h,v 1.44 1996/04/22 01:23:21 christos Exp $ */
/*-
@@ -150,9 +150,12 @@ struct unveil;
/*
* Locks used to protect struct members in this file:
* a atomic operations
+ * K kernel lock
* m this process' `ps_mtx'
* p this process' `ps_lock'
- * r rlimit_lock
+ * R rlimit_lock
+ * S scheduler lock
+ * T itimer_mtx
*/
struct process {
/*
@@ -199,7 +202,7 @@ struct process {
u_int ps_flags; /* [a] PS_* flags. */
int ps_siglist; /* Signals pending for the process. */
- struct proc *ps_single; /* Single threading to this thread. */
+ struct proc *ps_single; /* [S] Thread for single-threading. */
u_int ps_singlecount; /* [a] Not yet suspended threads. */
int ps_traceflag; /* Kernel trace points. */
@@ -216,7 +219,8 @@ struct process {
struct rusage *ps_ru; /* sum of stats for dead threads. */
struct tusage ps_tu; /* accumulated times. */
struct rusage ps_cru; /* sum of stats for reaped children */
- struct itimerspec ps_timer[3]; /* timers, indexed by ITIMER_* */
+ struct itimerspec ps_timer[3]; /* [K] ITIMER_REAL timer */
+ /* [T] ITIMER_{VIRTUAL,PROF} timers */
struct timeout ps_rucheck_to; /* [] resource limit check timer */
time_t ps_nextxcpu; /* when to send next SIGXCPU, */
/* in seconds of process runtime */
@@ -235,13 +239,14 @@ struct process {
/* The following fields are all copied upon creation in process_new. */
#define ps_startcopy ps_limit
- struct plimit *ps_limit; /* [m,r] Process limits. */
+ struct plimit *ps_limit; /* [m,R] Process limits. */
struct pgrp *ps_pgrp; /* Pointer to process group. */
struct emul *ps_emul; /* Emulation information */
char ps_comm[MAXCOMLEN+1];
vaddr_t ps_strings; /* User pointers to argv/env */
+ vaddr_t ps_timekeep; /* User pointer to timekeep */
vaddr_t ps_sigcode; /* User pointer to the signal code */
vaddr_t ps_sigcoderet; /* User pointer to sigreturn retPC */
u_long ps_sigcookie;
@@ -268,7 +273,7 @@ struct process {
int ps_refcnt; /* Number of references. */
struct timespec ps_start; /* starting uptime. */
- struct timeout ps_realit_to; /* real-time itimer trampoline. */
+ struct timeout ps_realit_to; /* [K] ITIMER_REAL timeout */
};
#define ps_session ps_pgrp->pg_session
@@ -325,12 +330,12 @@ struct p_inentry {
/*
* Locks used to protect struct members in this file:
* I immutable after creation
- * s scheduler lock
+ * S scheduler lock
* l read only reference, see lim_read_enter()
* o owned (read/modified only) by this thread
*/
struct proc {
- TAILQ_ENTRY(proc) p_runq; /* [s] current run/sleep queue */
+ TAILQ_ENTRY(proc) p_runq; /* [S] current run/sleep queue */
LIST_ENTRY(proc) p_list; /* List of all threads. */
struct process *p_p; /* [I] The process of this thread. */
@@ -347,8 +352,8 @@ struct proc {
int p_flag; /* P_* flags. */
u_char p_spare; /* unused */
- char p_stat; /* [s] S* process status. */
- u_char p_runpri; /* [s] Runqueue priority */
+ char p_stat; /* [S] S* process status. */
+ u_char p_runpri; /* [S] Runqueue priority */
u_char p_descfd; /* if not 255, fdesc permits this fd */
pid_t p_tid; /* Thread identifier. */
@@ -360,15 +365,15 @@ struct proc {
/* scheduling */
int p_cpticks; /* Ticks of cpu time. */
- const volatile void *p_wchan; /* [s] Sleep address. */
+ const volatile void *p_wchan; /* [S] Sleep address. */
struct timeout p_sleep_to;/* timeout for tsleep() */
- const char *p_wmesg; /* [s] Reason for sleep. */
- fixpt_t p_pctcpu; /* [s] %cpu for this thread */
- u_int p_slptime; /* [s] Time since last blocked. */
+ const char *p_wmesg; /* [S] Reason for sleep. */
+ fixpt_t p_pctcpu; /* [S] %cpu for this thread */
+ u_int p_slptime; /* [S] Time since last blocked. */
u_int p_uticks; /* Statclock hits in user mode. */
u_int p_sticks; /* Statclock hits in system mode. */
u_int p_iticks; /* Statclock hits processing intr. */
- struct cpu_info * volatile p_cpu; /* [s] CPU we're running on. */
+ struct cpu_info * volatile p_cpu; /* [S] CPU we're running on. */
struct rusage p_ru; /* Statistics */
struct tusage p_tu; /* accumulated times. */
@@ -378,18 +383,18 @@ struct proc {
struct kcov_dev *p_kd; /* kcov device handle */
struct lock_list_entry *p_sleeplocks; /* WITNESS lock tracking */
- int p_siglist; /* Signals arrived but not delivered. */
+ int p_siglist; /* [a] Signals arrived & not delivered*/
/* End area that is zeroed on creation. */
#define p_endzero p_startcopy
/* The following fields are all copied upon creation in fork. */
#define p_startcopy p_sigmask
- sigset_t p_sigmask; /* Current signal mask. */
+ sigset_t p_sigmask; /* [a] Current signal mask */
- u_char p_slppri; /* [s] Sleeping priority */
- u_char p_usrpri; /* [s] Priority based on p_estcpu & ps_nice */
- u_int p_estcpu; /* [s] Time averaged val of p_cpticks */
+ u_char p_slppri; /* [S] Sleeping priority */
+ u_char p_usrpri; /* [S] Priority based on p_estcpu & ps_nice */
+ u_int p_estcpu; /* [S] Time averaged val of p_cpticks */
int p_pledge_syscall; /* Cache of current syscall */
struct ucred *p_ucred; /* [o] cached credentials */
diff --git a/sys/sys/reboot.h b/sys/sys/reboot.h
index 492b554..805eab8 100644
--- a/sys/sys/reboot.h
+++ b/sys/sys/reboot.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: reboot.h,v 1.18 2019/04/01 07:00:52 tedu Exp $ */
+/* $OpenBSD: reboot.h,v 1.19 2020/05/23 00:40:53 deraadt Exp $ */
/* $NetBSD: reboot.h,v 1.9 1996/04/22 01:23:25 christos Exp $ */
/*
@@ -41,22 +41,23 @@
*/
#define RB_AUTOBOOT 0 /* flags for system auto-booting itself */
-#define RB_ASKNAME 0x0001 /* ask for file name to reboot from */
-#define RB_SINGLE 0x0002 /* reboot to single user only */
-#define RB_NOSYNC 0x0004 /* dont sync before reboot */
-#define RB_HALT 0x0008 /* don't reboot, just halt */
-#define RB_INITNAME 0x0010 /* name given for /etc/init (unused) */
-#define RB_DFLTROOT 0x0020 /* use compiled-in rootdev */
-#define RB_KDB 0x0040 /* give control to kernel debugger */
-#define RB_RDONLY 0x0080 /* mount root fs read-only */
-#define RB_DUMP 0x0100 /* dump kernel memory before reboot */
-#define RB_MINIROOT 0x0200 /* mini-root present in memory at boot time */
-#define RB_CONFIG 0x0400 /* change configured devices */
-#define RB_TIMEBAD 0x0800 /* don't call resettodr() in boot() */
-#define RB_POWERDOWN 0x1000 /* attempt to power down machine */
-#define RB_SERCONS 0x2000 /* use serial console if available */
-#define RB_USERREQ 0x4000 /* boot() called at user request (e.g. ddb) */
-#define RB_RESET 0x8000 /* just reset, no cleanup */
+#define RB_ASKNAME 0x00001 /* ask for file name to reboot from */
+#define RB_SINGLE 0x00002 /* reboot to single user only */
+#define RB_NOSYNC 0x00004 /* dont sync before reboot */
+#define RB_HALT 0x00008 /* don't reboot, just halt */
+#define RB_INITNAME 0x00010 /* name given for /etc/init (unused) */
+#define RB_DFLTROOT 0x00020 /* use compiled-in rootdev */
+#define RB_KDB 0x00040 /* give control to kernel debugger */
+#define RB_RDONLY 0x00080 /* mount root fs read-only */
+#define RB_DUMP 0x00100 /* dump kernel memory before reboot */
+#define RB_MINIROOT 0x00200 /* mini-root present in memory at boot time */
+#define RB_CONFIG 0x00400 /* change configured devices */
+#define RB_TIMEBAD 0x00800 /* don't call resettodr() in boot() */
+#define RB_POWERDOWN 0x01000 /* attempt to power down machine */
+#define RB_SERCONS 0x02000 /* use serial console if available */
+#define RB_USERREQ 0x04000 /* boot() called at user request (e.g. ddb) */
+#define RB_RESET 0x08000 /* just reset, no cleanup */
+#define RB_GOODRANDOM 0x10000 /* excellent random seed loaded */
/*
* Constants for converting boot-style device number to type,
diff --git a/sys/sys/sensors.h b/sys/sys/sensors.h
index 15725a6..e065d19 100644
--- a/sys/sys/sensors.h
+++ b/sys/sys/sensors.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sensors.h,v 1.36 2018/12/10 13:35:54 landry Exp $ */
+/* $OpenBSD: sensors.h,v 1.37 2020/07/15 07:13:57 kettenis Exp $ */
/*
* Copyright (c) 2003, 2004 Alexander Yurchenko <grange@openbsd.org>
@@ -53,6 +53,7 @@ enum sensor_type {
SENSOR_PRESSURE, /* pressure (mPa) */
SENSOR_ACCEL, /* acceleration (u m/s^2) */
SENSOR_VELOCITY, /* velocity (u m/s) */
+ SENSOR_ENERGY, /* energy (uJ) */
SENSOR_MAX_TYPES
};
@@ -80,6 +81,7 @@ static const char * const sensor_type_s[SENSOR_MAX_TYPES + 1] = {
"pressure",
"acceleration",
"velocity",
+ "energy",
"undefined"
};
#endif /* !_KERNEL */
diff --git a/sys/sys/signalvar.h b/sys/sys/signalvar.h
index 7ee361f..c8c71da 100644
--- a/sys/sys/signalvar.h
+++ b/sys/sys/signalvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signalvar.h,v 1.40 2020/03/13 09:25:21 mpi Exp $ */
+/* $OpenBSD: signalvar.h,v 1.44 2020/09/16 13:50:42 mpi Exp $ */
/* $NetBSD: signalvar.h,v 1.17 1996/04/22 01:23:31 christos Exp $ */
/*
@@ -86,9 +86,9 @@ struct sigacts {
* Clear a pending signal from a process.
*/
#define CLRSIG(p, sig) do { \
- int _mask = sigmask(sig); \
- atomic_clearbits_int(&(p)->p_siglist, _mask); \
- atomic_clearbits_int(&(p)->p_p->ps_siglist, _mask); \
+ int __mask = sigmask(sig); \
+ atomic_clearbits_int(&(p)->p_siglist, __mask); \
+ atomic_clearbits_int(&(p)->p_p->ps_siglist, __mask); \
} while (0)
/*
@@ -122,12 +122,13 @@ void pgsignal(struct pgrp *pgrp, int sig, int checkctty);
void psignal(struct proc *p, int sig);
void ptsignal(struct proc *p, int sig, enum signal_type type);
#define prsignal(pr,sig) ptsignal((pr)->ps_mainproc, (sig), SPROCESS)
-void siginit(struct process *);
+void siginit(struct sigacts *);
void trapsignal(struct proc *p, int sig, u_long code, int type,
union sigval val);
void sigexit(struct proc *, int);
+void sigabort(struct proc *);
+int sigismasked(struct proc *, int);
int sigonstack(size_t);
-void setsigvec(struct proc *, int, struct sigaction *);
int killpg1(struct proc *, int, int, int);
void signal_init(void);
diff --git a/sys/sys/smr.h b/sys/sys/smr.h
index 1ca42e0..b15689a 100644
--- a/sys/sys/smr.h
+++ b/sys/sys/smr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smr.h,v 1.6 2020/04/12 07:20:33 visa Exp $ */
+/* $OpenBSD: smr.h,v 1.7 2020/06/17 14:12:19 visa Exp $ */
/*
* Copyright (c) 2019 Visa Hankala
@@ -67,6 +67,8 @@ smr_init(struct smr_entry *smr)
#define SMR_ASSERT_NONCRITICAL() do {} while (0)
#endif
+#endif /* _KERNEL */
+
#define SMR_PTR_GET(pptr) READ_ONCE(*pptr)
#define SMR_PTR_GET_LOCKED(pptr) (*(pptr))
@@ -435,6 +437,4 @@ struct { \
* any concurrent readers to proceed iteration. */ \
} while (0)
-#endif /* _KERNEL */
-
#endif /* !_SYS_SMR_ */
diff --git a/sys/sys/srp.h b/sys/sys/srp.h
index a22e940..c2f40ab 100644
--- a/sys/sys/srp.h
+++ b/sys/sys/srp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: srp.h,v 1.14 2019/03/31 14:03:40 mpi Exp $ */
+/* $OpenBSD: srp.h,v 1.15 2020/05/09 10:18:27 jca Exp $ */
/*
* Copyright (c) 2014 Jonathan Matthew <jmatthew@openbsd.org>
@@ -96,11 +96,18 @@ void *srp_enter(struct srp_ref *, struct srp *);
void *srp_follow(struct srp_ref *, struct srp *);
void srp_leave(struct srp_ref *);
#else /* MULTIPROCESSOR */
+
+static inline void *
+srp_enter(struct srp_ref *sr, struct srp *srp)
+{
+ sr->hz = NULL;
+ return srp->ref;
+}
+
#define srp_swap(_srp, _v) srp_swap_locked((_srp), (_v))
#define srp_update(_gc, _srp, _v) srp_update_locked((_gc), (_srp), (_v))
#define srp_finalize(_v, _wchan) ((void)0)
-#define srp_enter(_sr, _srp) ((_srp)->ref)
-#define srp_follow(_sr, _srp) ((_srp)->ref)
+#define srp_follow(_sr, _srp) srp_enter(_sr, _srp)
#define srp_leave(_sr) do { } while (0)
#endif /* MULTIPROCESSOR */
diff --git a/sys/sys/stdarg.h b/sys/sys/stdarg.h
index 7b9b403..6309957 100644
--- a/sys/sys/stdarg.h
+++ b/sys/sys/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.9 2019/12/12 15:55:36 visa Exp $ */
+/* $OpenBSD: stdarg.h,v 1.10 2020/07/21 23:09:00 daniel Exp $ */
/*
* Copyright (c) 2003, 2004 Marc espie <espie@openbsd.org>
*
@@ -20,8 +20,6 @@
#include <sys/cdefs.h>
-#if (defined(__GNUC__) && __GNUC__ >= 3) || defined(__PCC__)
-
/* Define __gnuc_va_list. */
#ifndef __GNUC_VA_LIST
@@ -40,10 +38,6 @@ typedef __builtin_va_list __gnuc_va_list;
typedef __gnuc_va_list va_list;
-#else
-#error "unsupported compiler"
-#endif
-
#if __ISO_C_VISIBLE >= 1999
#define va_copy(dst, src) __va_copy((dst), (src))
#endif
diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h
index 9e2fc55..5e5115d 100644
--- a/sys/sys/sysctl.h
+++ b/sys/sys/sysctl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysctl.h,v 1.205 2020/03/13 10:07:01 anton Exp $ */
+/* $OpenBSD: sysctl.h,v 1.211 2020/09/01 01:53:50 gnezdo Exp $ */
/* $NetBSD: sysctl.h,v 1.16 1996/04/09 20:55:36 cgd Exp $ */
/*
@@ -679,7 +679,7 @@ do { \
PR_UNLOCK(pr); \
\
if (((pr)->ps_flags & PS_ZOMBIE) == 0) { \
- struct timeval tv; \
+ struct timeval __tv; \
\
(kp)->p_uvalid = 1; \
\
@@ -699,9 +699,9 @@ do { \
(kp)->p_uru_nivcsw = (p)->p_ru.ru_nivcsw; \
\
timeradd(&(pr)->ps_cru.ru_utime, \
- &(pr)->ps_cru.ru_stime, &tv); \
- (kp)->p_uctime_sec = tv.tv_sec; \
- (kp)->p_uctime_usec = tv.tv_usec; \
+ &(pr)->ps_cru.ru_stime, &__tv); \
+ (kp)->p_uctime_sec = __tv.tv_sec; \
+ (kp)->p_uctime_usec = __tv.tv_usec; \
} \
\
(kp)->p_cpuid = KI_NOCPU; \
@@ -957,7 +957,7 @@ struct kinfo_file {
#define CTL_DEBUG_MAXID 20
#ifdef _KERNEL
-#ifdef DEBUG
+#ifdef DEBUG_SYSCTL
/*
* CTL_DEBUG variables.
*
@@ -974,11 +974,18 @@ struct ctldebug {
char *debugname; /* name of debugging variable */
int *debugvar; /* pointer to debugging variable */
};
-extern struct ctldebug debug0, debug1, debug2, debug3, debug4;
-extern struct ctldebug debug5, debug6, debug7, debug8, debug9;
-extern struct ctldebug debug10, debug11, debug12, debug13, debug14;
-extern struct ctldebug debug15, debug16, debug17, debug18, debug19;
-#endif /* DEBUG */
+#endif /* DEBUG_SYSCTL */
+
+/*
+ * Exported sysctl variable with valid bounds. Both bounds are inclusive to
+ * allow full range of values.
+ */
+struct sysctl_bounded_args {
+ int mib; /* identifier shared with userspace as a CTL_ #define */
+ int *var; /* never NULL */
+ int minimum; /* checking is disabled if minimum == maximum */
+ int maximum;
+};
/*
* Internal sysctl function calling convention:
@@ -992,9 +999,11 @@ extern struct ctldebug debug15, debug16, debug17, debug18, debug19;
typedef int (sysctlfn)(int *, u_int, void *, size_t *, void *, size_t, struct proc *);
int sysctl_int(void *, size_t *, void *, size_t, int *);
+int sysctl_int_bounded(void *, size_t *, void *, size_t, int *, int, int);
int sysctl_int_lower(void *, size_t *, void *, size_t, int *);
int sysctl_rdint(void *, size_t *, void *, int);
-int sysctl_int_arr(int **, int *, u_int, void *, size_t *, void *, size_t);
+int sysctl_bounded_arr(const struct sysctl_bounded_args *, u_int,
+ int *, u_int, void *, size_t *, void *, size_t);
int sysctl_quad(void *, size_t *, void *, size_t, int64_t *);
int sysctl_rdquad(void *, size_t *, void *, int64_t);
int sysctl_string(void *, size_t *, void *, size_t, char *, size_t);
@@ -1023,7 +1032,7 @@ int kern_sysctl(int *, u_int, void *, size_t *, void *, size_t,
struct proc *);
int hw_sysctl(int *, u_int, void *, size_t *, void *, size_t,
struct proc *);
-#ifdef DEBUG
+#ifdef DEBUG_SYSCTL
int debug_sysctl(int *, u_int, void *, size_t *, void *, size_t,
struct proc *);
#endif
diff --git a/sys/sys/syslog.h b/sys/sys/syslog.h
index c70a660..a20651e 100644
--- a/sys/sys/syslog.h
+++ b/sys/sys/syslog.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: syslog.h,v 1.16 2017/08/08 14:23:23 bluhm Exp $ */
+/* $OpenBSD: syslog.h,v 1.17 2020/05/21 01:39:56 visa Exp $ */
/* $NetBSD: syslog.h,v 1.14 1996/04/03 20:46:44 christos Exp $ */
/*
@@ -183,11 +183,10 @@ struct syslog_data {
#ifndef _KERNEL
/*
- * Don't use va_list in the vsyslog() prototype. Va_list is typedef'd in two
- * places (<machine/varargs.h> and <machine/stdarg.h>), so if we include one
- * of them here we may collide with the utility's includes. It's unreasonable
- * for utilities to have to include one of them to include syslog.h, so we get
- * __va_list from <machine/_types.h> and use it.
+ * Don't use va_list in the vsyslog() prototype. Va_list is typedef'd
+ * in <stdarg.h>. Including it here may collide with the utility's includes.
+ * It's unreasonable for utilities to have to include it to include <syslog.h>,
+ * so we get __va_list from <machine/_types.h> and use it.
*/
#include <sys/cdefs.h>
#include <machine/_types.h>
diff --git a/sys/sys/systm.h b/sys/sys/systm.h
index 5dec672..c982038 100644
--- a/sys/sys/systm.h
+++ b/sys/sys/systm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: systm.h,v 1.145 2020/03/20 03:37:08 cheloha Exp $ */
+/* $OpenBSD: systm.h,v 1.148 2020/08/26 03:29:07 visa Exp $ */
/* $NetBSD: systm.h,v 1.50 1996/06/09 04:55:09 briggs Exp $ */
/*-
@@ -81,6 +81,12 @@ extern const char osrelease[];
extern int cold; /* cold start flag initialized in locore */
extern int db_active; /* running currently inside ddb(4) */
+extern char *hw_vendor; /* sysctl hw.vendor */
+extern char *hw_prod; /* sysctl hw.product */
+extern char *hw_uuid; /* sysctl hw.uuid */
+extern char *hw_serial; /* sysctl hw.serialno */
+extern char *hw_ver; /* sysctl hw.version */
+
extern int ncpus; /* number of CPUs used */
extern int ncpusfound; /* number of CPUs found */
extern int nblkdev; /* number of entries in bdevsw */
@@ -211,6 +217,11 @@ int copyin(const void *, void *, size_t)
int copyout(const void *, void *, size_t);
int copyin32(const uint32_t *, uint32_t *);
+void random_start(int);
+void enqueue_randomness(unsigned int);
+void suspend_randomness(void);
+void resume_randomness(char *, size_t);
+
struct arc4random_ctx;
void arc4random_buf(void *, size_t)
__attribute__ ((__bounded__(__buffer__,1,2)));
@@ -315,31 +326,40 @@ int uiomove(void *, size_t, struct uio *);
extern struct rwlock netlock;
-#define NET_LOCK() NET_WLOCK()
-#define NET_UNLOCK() NET_WUNLOCK()
-#define NET_ASSERT_UNLOCKED() NET_ASSERT_WUNLOCKED()
+/*
+ * Network stack data structures are, unless stated otherwise, protected
+ * by the NET_LOCK(). It's a single non-recursive lock for the whole
+ * subsystem.
+ */
+#define NET_LOCK() do { rw_enter_write(&netlock); } while (0)
+#define NET_UNLOCK() do { rw_exit_write(&netlock); } while (0)
+/*
+ * Reader version of NET_LOCK() to be used in "softnet" thread only.
-#define NET_WLOCK() do { rw_enter_write(&netlock); } while (0)
-#define NET_WUNLOCK() do { rw_exit_write(&netlock); } while (0)
+ * The "softnet" thread should be the only thread processing packets
+ * without holding an exclusive lock. This is done to allow read-only
+ * ioctl(2) to not block.
+ */
+#define NET_RLOCK_IN_SOFTNET() do { rw_enter_read(&netlock); } while (0)
+#define NET_RUNLOCK_IN_SOFTNET()do { rw_exit_read(&netlock); } while (0)
-#define NET_ASSERT_WLOCKED() \
-do { \
- int _s = rw_status(&netlock); \
- if ((splassert_ctl > 0) && (_s != RW_WRITE)) \
- splassert_fail(RW_WRITE, _s, __func__); \
-} while (0)
+/*
+ * Reader version of NET_LOCK() to be used in ioctl/sysctl path only.
+ *
+ * Can be grabbed instead of the exclusive version when no field
+ * protected by the NET_LOCK() is modified by the ioctl/sysctl.
+ */
+#define NET_RLOCK_IN_IOCTL() do { rw_enter_read(&netlock); } while (0)
+#define NET_RUNLOCK_IN_IOCTL() do { rw_exit_read(&netlock); } while (0)
-#define NET_ASSERT_WUNLOCKED() \
+#define NET_ASSERT_UNLOCKED() \
do { \
int _s = rw_status(&netlock); \
if ((splassert_ctl > 0) && (_s == RW_WRITE)) \
splassert_fail(0, RW_WRITE, __func__); \
} while (0)
-#define NET_RLOCK() do { rw_enter_read(&netlock); } while (0)
-#define NET_RUNLOCK() do { rw_exit_read(&netlock); } while (0)
-
#define NET_ASSERT_LOCKED() \
do { \
int _s = rw_status(&netlock); \
diff --git a/sys/sys/task.h b/sys/sys/task.h
index 222c2a7..07a2cd6 100644
--- a/sys/sys/task.h
+++ b/sys/sys/task.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: task.h,v 1.16 2019/06/23 12:56:10 kettenis Exp $ */
+/* $OpenBSD: task.h,v 1.18 2020/08/01 08:40:20 anton Exp $ */
/*
* Copyright (c) 2013 David Gwynne <dlg@openbsd.org>
@@ -28,10 +28,12 @@ struct task {
void (*t_func)(void *);
void *t_arg;
unsigned int t_flags;
+#if 1 /* NKCOV > 0 */
+ struct process *t_process;
+#endif
};
#define TASK_ONQUEUE 1
-#define TASK_BARRIER 2
TAILQ_HEAD(task_list, task);
diff --git a/sys/sys/time.h b/sys/sys/time.h
index 564bae3..69e58e9 100644
--- a/sys/sys/time.h
+++ b/sys/sys/time.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: time.h,v 1.50 2020/01/15 13:17:35 mpi Exp $ */
+/* $OpenBSD: time.h,v 1.55 2020/07/06 13:33:09 pirofti Exp $ */
/* $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ */
/*
@@ -163,7 +163,7 @@ struct clockinfo {
};
#endif /* __BSD_VISIBLE */
-#if defined(_KERNEL) || defined(_STANDALONE)
+#if defined(_KERNEL) || defined(_STANDALONE) || defined (_LIBC)
#include <sys/_time.h>
/* Time expressed as seconds and fractions of a second + operations on it. */
@@ -171,6 +171,9 @@ struct bintime {
time_t sec;
uint64_t frac;
};
+#endif
+
+#if defined(_KERNEL) || defined(_STANDALONE) || defined (_LIBC)
#define bintimecmp(btp, ctp, cmp) \
((btp)->sec == (ctp)->sec ? \
@@ -249,9 +252,9 @@ TIMEVAL_TO_BINTIME(const struct timeval *tv, struct bintime *bt)
/* 18446744073709 = int(2^64 / 1000000) */
bt->frac = (uint64_t)tv->tv_usec * (uint64_t)18446744073709ULL;
}
+#endif
-extern volatile time_t time_second; /* Seconds since epoch, wall time. */
-extern volatile time_t time_uptime; /* Seconds since reboot. */
+#if defined(_KERNEL) || defined(_STANDALONE)
/*
* Functions for looking at our clocks: [get]{bin,nano,micro}[boot|up]time()
@@ -295,6 +298,12 @@ void binboottime(struct bintime *);
void microboottime(struct timeval *);
void nanoboottime(struct timespec *);
+void binruntime(struct bintime *);
+void nanoruntime(struct timespec *);
+
+time_t gettime(void);
+time_t getuptime(void);
+
struct proc;
int clock_gettime(struct proc *, clockid_t, struct timespec *);
@@ -335,6 +344,13 @@ void clock_secs_to_ymdhms(time_t, struct clock_ymdhms *);
#include <sys/stdint.h>
static inline void
+USEC_TO_TIMEVAL(uint64_t us, struct timeval *tv)
+{
+ tv->tv_sec = us / 1000000;
+ tv->tv_usec = us % 1000000;
+}
+
+static inline void
NSEC_TO_TIMEVAL(uint64_t ns, struct timeval *tv)
{
tv->tv_sec = ns / 1000000000L;
diff --git a/sys/sys/timeout.h b/sys/sys/timeout.h
index 1cd9fca..4c6ac5a 100644
--- a/sys/sys/timeout.h
+++ b/sys/sys/timeout.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: timeout.h,v 1.36 2020/01/03 02:16:38 cheloha Exp $ */
+/* $OpenBSD: timeout.h,v 1.39 2020/08/07 00:45:25 cheloha Exp $ */
/*
* Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org>
* All rights reserved.
@@ -62,6 +62,9 @@ struct timeout {
void *to_arg; /* function argument */
int to_time; /* ticks on event */
int to_flags; /* misc flags */
+#if 1 /* NKCOV > 0 */
+ struct process *to_process; /* kcov identifier */
+#endif
};
/*
@@ -71,7 +74,6 @@ struct timeout {
#define TIMEOUT_ONQUEUE 0x02 /* on any timeout queue */
#define TIMEOUT_INITIALIZED 0x04 /* initialized */
#define TIMEOUT_TRIGGERED 0x08 /* running or ran */
-#define TIMEOUT_SCHEDULED 0x10 /* put on wheel at least once */
struct timeoutstat {
uint64_t tos_added; /* timeout_add*(9) calls */
@@ -111,15 +113,11 @@ int timeout_sysctl(void *, size_t *, void *, size_t);
#define TIMEOUT_INITIALIZER(_f, _a) TIMEOUT_INITIALIZER_FLAGS((_f), (_a), 0)
-struct bintime;
-
void timeout_set(struct timeout *, void (*)(void *), void *);
void timeout_set_flags(struct timeout *, void (*)(void *), void *, int);
void timeout_set_proc(struct timeout *, void (*)(void *), void *);
int timeout_add(struct timeout *, int);
int timeout_add_tv(struct timeout *, const struct timeval *);
-int timeout_add_ts(struct timeout *, const struct timespec *);
-int timeout_add_bt(struct timeout *, const struct bintime *);
int timeout_add_sec(struct timeout *, int);
int timeout_add_msec(struct timeout *, int);
int timeout_add_usec(struct timeout *, int);
diff --git a/sys/sys/timetc.h b/sys/sys/timetc.h
index ce81c34..dccee13 100644
--- a/sys/sys/timetc.h
+++ b/sys/sys/timetc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: timetc.h,v 1.10 2019/10/26 21:16:38 cheloha Exp $ */
+/* $OpenBSD: timetc.h,v 1.12 2020/07/06 13:33:09 pirofti Exp $ */
/*
* Copyright (c) 2000 Poul-Henning Kamp <phk@FreeBSD.org>
@@ -24,10 +24,11 @@
#ifndef _SYS_TIMETC_H_
#define _SYS_TIMETC_H_
-#ifndef _KERNEL
+#if !defined(_KERNEL) && !defined(_LIBC)
#error "no user-serviceable parts inside"
#endif
+#include <machine/timetc.h>
#include <sys/queue.h>
/*-
@@ -48,8 +49,8 @@ typedef void timecounter_pps_t(struct timecounter *);
/*
* Locks used to protect struct members in this file:
* I immutable after initialization
- * t tc_lock
- * w windup_mtx
+ * T tc_lock
+ * W windup_mtx
*/
struct timecounter {
@@ -80,19 +81,42 @@ struct timecounter {
*/
void *tc_priv; /* [I] */
/* Pointer to the timecounter's private parts. */
+ int tc_user; /* [I] */
+ /* Expose this timecounter to userland. */
SLIST_ENTRY(timecounter) tc_next; /* [I] */
/* Pointer to the next timecounter. */
- int64_t tc_freq_adj; /* [tw] */
+ int64_t tc_freq_adj; /* [T,W] */
/* Current frequency adjustment. */
u_int64_t tc_precision; /* [I] */
/* Precision of the counter. Computed in tc_init(). */
};
+struct timekeep {
+ /* set at initialization */
+ uint32_t tk_version; /* version number */
+
+ /* timehands members */
+ uint64_t tk_scale;
+ u_int tk_offset_count;
+ struct bintime tk_offset;
+ struct bintime tk_naptime;
+ struct bintime tk_boottime;
+ volatile u_int tk_generation;
+
+ /* timecounter members */
+ int tk_user;
+ u_int tk_counter_mask;
+};
+#define TK_VERSION 0
+
struct rwlock;
extern struct rwlock tc_lock;
extern struct timecounter *timecounter;
+extern struct uvm_object *timekeep_object;
+extern struct timekeep *timekeep;
+
u_int64_t tc_getfrequency(void);
u_int64_t tc_getprecision(void);
void tc_init(struct timecounter *tc);
diff --git a/sys/sys/tty.h b/sys/sys/tty.h
index efe0bfb..cce1581 100644
--- a/sys/sys/tty.h
+++ b/sys/sys/tty.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.h,v 1.38 2019/07/19 00:17:16 cheloha Exp $ */
+/* $OpenBSD: tty.h,v 1.39 2020/07/14 14:33:06 deraadt Exp $ */
/* $NetBSD: tty.h,v 1.30.4.1 1996/06/02 09:08:13 mrg Exp $ */
/*-
@@ -290,8 +290,8 @@ int ttymodem(struct tty *tp, int flag);
int ttyopen(dev_t device, struct tty *tp, struct proc *p);
int ttyoutput(int c, struct tty *tp);
void ttypend(struct tty *tp);
-void ttyretype(struct tty *tp);
-void ttyrub(int c, struct tty *tp);
+int ttyretype(struct tty *tp);
+int ttyrub(int c, struct tty *tp);
int ttysleep(struct tty *tp, void *chan, int pri, char *wmesg);
int ttywait(struct tty *tp);
int ttywflush(struct tty *tp);
diff --git a/sys/sys/varargs.h b/sys/sys/varargs.h
index bdd161b..7814af9 100644
--- a/sys/sys/varargs.h
+++ b/sys/sys/varargs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: varargs.h,v 1.3 2019/12/07 06:55:20 visa Exp $ */
+/* $OpenBSD: varargs.h,v 1.4 2020/07/21 23:09:00 daniel Exp $ */
/*
* Copyright (c) 2003, 2004 Marc espie <espie@openbsd.org>
*
@@ -18,7 +18,6 @@
#ifndef _VARARGS_H_
#define _VARARGS_H_
-#if defined(__GNUC__) && __GNUC__ >= 3
/* These macros implement traditional (non-ANSI) varargs
for GNU C. */
@@ -49,8 +48,4 @@ typedef __builtin_va_list __gnuc_va_list;
typedef __gnuc_va_list va_list;
-#else
-#error "unsupported compiler"
-#endif
-
#endif /* _VARARGS_H_ */