11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 /* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
28 /* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
29 /* All Rights Reserved */
30
31 #pragma ident "%Z%%M% %I% %E% SMI"
32
33 #include <sys/proc.h>
34 #include <sys/priocntl.h>
35 #include <sys/class.h>
36 #include <sys/disp.h>
37 #include <sys/rt.h>
38 #include <sys/rtpriocntl.h>
39 #include <sys/modctl.h>
40
41 /*
42 * The purpose of this file is to allow a user to make their own
43 * rt_dptbl. The contents of this file should be included in the
44 * rt_dptbl(4) man page with proper instructions for making
45 * and replacing the RT_DPTBL.kmod in modules/sched. This was the
46 * only way to provide functionality equivalent to the mkboot/cunix
47 * method in SVr4 without having the utilities mkboot/cunix in
48 * SunOS/Svr4.
49 * It is recommended that the system calls be used to change the time
50 * quantums instead of re-building the module.
51 */
52
53 static struct modlmisc modlmisc = {
54 &mod_miscops, "realtime dispatch table"
55 };
56
57 static struct modlinkage modlinkage = {
58 MODREV_1, &modlmisc, 0
59 };
60
61 int
62 _init()
63 {
64 return (mod_install(&modlinkage));
65 }
66
67 int
68 _info(struct modinfo *modinfop)
69 {
70 return (mod_info(&modlinkage, modinfop));
71 }
72
73 #define RTGPPRIO0 100 /* Global priority for RT priority 0 */
74
75 rtdpent_t config_rt_dptbl[] = {
76
77 /* prilevel Time quantum */
78
79 RTGPPRIO0, 100,
80 RTGPPRIO0+1, 100,
81 RTGPPRIO0+2, 100,
82 RTGPPRIO0+3, 100,
83 RTGPPRIO0+4, 100,
84 RTGPPRIO0+5, 100,
85 RTGPPRIO0+6, 100,
86 RTGPPRIO0+7, 100,
87 RTGPPRIO0+8, 100,
88 RTGPPRIO0+9, 100,
89 RTGPPRIO0+10, 80,
90 RTGPPRIO0+11, 80,
91 RTGPPRIO0+12, 80,
92 RTGPPRIO0+13, 80,
93 RTGPPRIO0+14, 80,
94 RTGPPRIO0+15, 80,
|
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 /* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
28 /* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
29 /* All Rights Reserved */
30
31 #include <sys/proc.h>
32 #include <sys/priocntl.h>
33 #include <sys/class.h>
34 #include <sys/disp.h>
35 #include <sys/rt.h>
36 #include <sys/rtpriocntl.h>
37 #include <sys/modctl.h>
38
39 /*
40 * The purpose of this file is to allow a user to make their own
41 * rt_dptbl. The contents of this file should be included in the
42 * rt_dptbl(4) man page with proper instructions for making
43 * and replacing the RT_DPTBL.kmod in modules/sched. This was the
44 * only way to provide functionality equivalent to the mkboot/cunix
45 * method in SVr4 without having the utilities mkboot/cunix in
46 * SunOS/Svr4.
47 * It is recommended that the system calls be used to change the time
48 * quantums instead of re-building the module.
49 */
50
51 static struct modlmisc modlmisc = {
52 &mod_miscops, "realtime dispatch table"
53 };
54
55 static struct modlinkage modlinkage = {
56 MODREV_1, &modlmisc, 0
57 };
58
59 int
60 _init()
61 {
62 return (mod_install(&modlinkage));
63 }
64
65 int
66 _info(struct modinfo *modinfop)
67 {
68 return (mod_info(&modlinkage, modinfop));
69 }
70
71 rtdpent_t config_rt_dptbl[] = {
72
73 /* prilevel Time quantum */
74
75 RTGPPRIO0, 100,
76 RTGPPRIO0+1, 100,
77 RTGPPRIO0+2, 100,
78 RTGPPRIO0+3, 100,
79 RTGPPRIO0+4, 100,
80 RTGPPRIO0+5, 100,
81 RTGPPRIO0+6, 100,
82 RTGPPRIO0+7, 100,
83 RTGPPRIO0+8, 100,
84 RTGPPRIO0+9, 100,
85 RTGPPRIO0+10, 80,
86 RTGPPRIO0+11, 80,
87 RTGPPRIO0+12, 80,
88 RTGPPRIO0+13, 80,
89 RTGPPRIO0+14, 80,
90 RTGPPRIO0+15, 80,
|