aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/rtprio.h
diff options
context:
space:
mode:
authorJason Evans <jasone@FreeBSD.org>2000-09-07 01:33:02 +0000
committerJason Evans <jasone@FreeBSD.org>2000-09-07 01:33:02 +0000
commit0384fff8c5b098545c3db311b0e0aa1ec4c9ae7e (patch)
treebc6e36e781569f3efe04995c0b0befebb9154ef5 /sys/sys/rtprio.h
parent62ae6c89ad2b03770097d05590093f93b9d94e08 (diff)
downloadsrc-0384fff8c5b098545c3db311b0e0aa1ec4c9ae7e.tar.gz
src-0384fff8c5b098545c3db311b0e0aa1ec4c9ae7e.zip
Major update to the way synchronization is done in the kernel. Highlights
include: * Mutual exclusion is used instead of spl*(). See mutex(9). (Note: The alpha port is still in transition and currently uses both.) * Per-CPU idle processes. * Interrupts are run in their own separate kernel threads and can be preempted (i386 only). Partially contributed by: BSDi (BSD/OS) Submissions by (at least): cp, dfr, dillon, grog, jake, jhb, sheldonh
Notes
Notes: svn path=/head/; revision=65557
Diffstat (limited to 'sys/sys/rtprio.h')
-rw-r--r--sys/sys/rtprio.h33
1 files changed, 28 insertions, 5 deletions
diff --git a/sys/sys/rtprio.h b/sys/sys/rtprio.h
index 5178b0e4ea69..578afc515f63 100644
--- a/sys/sys/rtprio.h
+++ b/sys/sys/rtprio.h
@@ -38,11 +38,12 @@
* Process realtime-priority specifications to rtprio.
*/
-/* priority types */
+/* priority types. Start at 1 to catch uninitialized fields. */
-#define RTP_PRIO_REALTIME 0
-#define RTP_PRIO_NORMAL 1
-#define RTP_PRIO_IDLE 2
+#define RTP_PRIO_ITHREAD 1 /* interrupt thread */
+#define RTP_PRIO_REALTIME 2 /* real time process */
+#define RTP_PRIO_NORMAL 3 /* time sharing process */
+#define RTP_PRIO_IDLE 4 /* idle process */
/* RTP_PRIO_FIFO is POSIX.1B SCHED_FIFO.
*/
@@ -64,12 +65,34 @@
#define RTP_SET 1
#ifndef LOCORE
+/*
+ * Scheduling class information. This is strictly speaking not only
+ * for real-time processes. We should replace it with two variables:
+ * class and priority. At the moment we use prio here for real-time
+ * and interrupt processes, and for others we use proc.p_pri. FIXME.
+ */
struct rtprio {
- u_short type;
+ u_short type; /* scheduling class */
u_short prio;
};
#endif
+/*
+ * Interrupt thread priorities, after BSD/OS.
+ */
+#define PI_REALTIME 1 /* very high priority (clock) */
+#define PI_AV 2 /* Audio/video devices */
+#define PI_TTYHIGH 3 /* High priority tty's (small FIFOs) */
+#define PI_TAPE 4 /* Tape devices (high for streaming) */
+#define PI_NET 5 /* Network interfaces */
+#define PI_DISK 6 /* Disks and SCSI */
+#define PI_TTYLOW 7 /* Ttys with big buffers */
+#define PI_DISKLOW 8 /* Disks that do programmed I/O */
+#define PI_DULL 9 /* We don't know or care */
+
+/* Soft interrupt threads */
+#define PI_SOFT 15 /* All soft interrupts */
+
#ifndef _KERNEL
#include <sys/cdefs.h>