From 3eb2971d583fe6f42929521644d453587ced42dd Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Tue, 26 Jun 2007 19:31:10 +0000 Subject: [PATCH] Repo-copy numerous files from sys/emulation/posix4 to sys/sys and sys/kern and adjust the build to suit. posix scheduling is here to stay. Submitted-by: Joe Talbott --- sys/conf/files | 8 +- sys/emulation/linux/linux_misc.c | 4 +- sys/emulation/posix4/aio.h | 111 ----------- sys/emulation/posix4/ksched.c | 265 --------------------------- sys/emulation/posix4/mqueue.h | 78 -------- sys/emulation/posix4/p1003_1b.c | 295 ------------------------------ sys/emulation/posix4/posix4.h | 105 ----------- sys/emulation/posix4/posix4_mib.c | 100 ---------- sys/emulation/posix4/sched.h | 77 -------- sys/emulation/posix4/semaphore.h | 73 -------- sys/kern/kern_p1003_1b.c | 5 +- sys/kern/kern_posix4_mib.c | 4 +- sys/kern/kern_sched.c | 4 +- sys/sys/posix4.h | 4 +- 14 files changed, 14 insertions(+), 1119 deletions(-) delete mode 100644 sys/emulation/posix4/aio.h delete mode 100644 sys/emulation/posix4/ksched.c delete mode 100644 sys/emulation/posix4/mqueue.h delete mode 100644 sys/emulation/posix4/p1003_1b.c delete mode 100644 sys/emulation/posix4/posix4.h delete mode 100644 sys/emulation/posix4/posix4_mib.c delete mode 100644 sys/emulation/posix4/sched.h delete mode 100644 sys/emulation/posix4/semaphore.h diff --git a/sys/conf/files b/sys/conf/files index 06f0ef06e1..7d18a630c0 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1,5 +1,5 @@ # $FreeBSD: src/sys/conf/files,v 1.340.2.137 2003/06/04 17:10:30 sam Exp $ -# $DragonFly: src/sys/conf/files,v 1.164 2007/06/18 05:13:32 dillon Exp $ +# $DragonFly: src/sys/conf/files,v 1.165 2007/06/26 19:30:46 dillon Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -1103,9 +1103,9 @@ bus/pci/pci_if.m optional pci bus/pci/pcib_if.m optional pci dev/powermng/i386/alpm/alpm.c optional alpm dev/misc/xrpu/xrpu.c optional xrpu -emulation/posix4/posix4_mib.c standard -emulation/posix4/p1003_1b.c standard -emulation/posix4/ksched.c optional _kposix_priority_scheduling +kern/kern_posix4_mib.c standard +kern/kern_p1003_1b.c standard +kern/kern_sched.c optional _kposix_priority_scheduling vfs/ufs/ffs_alloc.c optional ffs vfs/ufs/ffs_alloc.c optional mfs vfs/ufs/ffs_balloc.c optional ffs diff --git a/sys/emulation/linux/linux_misc.c b/sys/emulation/linux/linux_misc.c index a1bd5e2f34..4e8ae14964 100644 --- a/sys/emulation/linux/linux_misc.c +++ b/sys/emulation/linux/linux_misc.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.85.2.9 2002/09/24 08:11:41 mdodd Exp $ - * $DragonFly: src/sys/emulation/linux/linux_misc.c,v 1.38 2007/05/09 00:53:34 dillon Exp $ + * $DragonFly: src/sys/emulation/linux/linux_misc.c,v 1.39 2007/06/26 19:31:03 dillon Exp $ */ #include "opt_compat.h" @@ -75,7 +75,7 @@ #include #endif -#include +#include #include #include diff --git a/sys/emulation/posix4/aio.h b/sys/emulation/posix4/aio.h deleted file mode 100644 index 96d257d87f..0000000000 --- a/sys/emulation/posix4/aio.h +++ /dev/null @@ -1,111 +0,0 @@ -/* XXX Conflicts with John's - not installed. - */ -/*- - * Copyright (c) 1996, 1997 - * HD Associates, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by HD Associates, Inc - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL HD ASSOCIATES OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: src/sys/posix4/aio.h,v 1.6 1999/12/29 04:55:01 peter Exp $ - * $DragonFly: src/sys/emulation/posix4/Attic/aio.h,v 1.3 2003/08/27 06:30:04 rob Exp $ - */ - -/* aio.h: P1003.1B-1993 Asynchronous I/O */ - -#ifndef _P1003_1B_AIO_H_ -#define _P1003_1B_AIO_H_ - -#include -#include - -/* For struct sigevent: - */ -#ifdef _KERNEL -#include -#else -#include - -#ifdef _P1003_1B_INCLUDE_MAYBES -#include -#include -#else -struct timespec; -#endif -#endif - -/* Return values: */ - -#define AIO_CANCELED 0x01 /* All operations cancelled */ -#define AIO_NOTCANCELLED 0x02 /* Some not cancelled */ -#define AIO_ALLDONE 0x04 /* None were cancelled */ - -/* lio_listio synchronization options */ - -#define LIO_WAIT 0x08 /* Suspend until complete */ -#define LIO_NOWAIT 0x10 /* Continue operation */ - -/* lio_listio element operations */ - -#define LIO_READ 0x20 -#define LIO_WRITE 0x40 -#define LIO_NOP 0x80 - -typedef struct aiocb * const aio_listio_ctl; -typedef const struct aiocb * const caio_listio_ctl; - -struct aiocb { - int aio_fildes; /* File descriptor */ - off_t aio_offset; /* File offset */ - volatile void * aio_buf; /* Location of buffer */ - size_t aio_nbytes; /* Length of transfer */ - int aio_reqprio; /* Request priority offset */ - struct sigevent aio_sigevent; /* Signal number and value */ - int aio_lio_opcode; /* Operation to be performed */ -}; - -#ifndef _KERNEL -#include - -__BEGIN_DECLS -int aio_read (struct aiocb *); -int aio_write (struct aiocb *); - -int lio_listio (int, aio_listio_ctl[], int, struct sigevent *); - -int aio_error (const struct aiocb *); -ssize_t aio_return (struct aiocb *); -int aio_cancel (int, struct aiocb *); - -int aio_suspend (caio_listio_ctl[], int, const struct timespec *); - -int aio_fsync (int, struct aiocb *); -__END_DECLS - -#endif /* _KERNEL */ - -#endif /* _P1003_1B_AIO_H_ */ diff --git a/sys/emulation/posix4/ksched.c b/sys/emulation/posix4/ksched.c deleted file mode 100644 index 2671fb72aa..0000000000 --- a/sys/emulation/posix4/ksched.c +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright (c) 1996, 1997 - * HD Associates, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by HD Associates, Inc - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL HD ASSOCIATES OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: src/sys/posix4/ksched.c,v 1.7.2.1 2000/05/16 06:58:13 dillon Exp $ - * $DragonFly: src/sys/emulation/posix4/Attic/ksched.c,v 1.8 2007/02/03 17:05:57 corecode Exp $ - */ - -/* ksched: Soft real time scheduling based on "rtprio". - */ - -#include -#include -#include -#include -#include -#include /* For need_user_resched */ - -#include "posix4.h" - -/* ksched: Real-time extension to support POSIX priority scheduling. - */ - -struct ksched { - struct timespec rr_interval; -}; - -int ksched_attach(struct ksched **p) -{ - struct ksched *ksched= p31b_malloc(sizeof(*ksched)); - - ksched->rr_interval.tv_sec = 0; - ksched->rr_interval.tv_nsec = 1000000000L / 10; /* XXX */ - - *p = ksched; - return 0; -} - -int ksched_detach(struct ksched *p) -{ - p31b_free(p); - - return 0; -} - -/* - * XXX About priorities - * - * POSIX 1003.1b requires that numerically higher priorities be of - * higher priority. It also permits sched_setparam to be - * implementation defined for SCHED_OTHER. I don't like - * the notion of inverted priorites for normal processes when - * you can use "setpriority" for that. - * - * I'm rejecting sched_setparam for SCHED_OTHER with EINVAL. - */ - -/* Macros to convert between the unix (lower numerically is higher priority) - * and POSIX 1003.1b (higher numerically is higher priority) - */ - -#define p4prio_to_rtpprio(P) (RTP_PRIO_MAX - (P)) -#define rtpprio_to_p4prio(P) (RTP_PRIO_MAX - (P)) - -/* These improve readability a bit for me: - */ -#define P1B_PRIO_MIN rtpprio_to_p4prio(RTP_PRIO_MAX) -#define P1B_PRIO_MAX rtpprio_to_p4prio(RTP_PRIO_MIN) - -static __inline int -getscheduler(register_t *ret, struct ksched *ksched, struct lwp *lp) -{ - int e = 0; - - switch (lp->lwp_rtprio.type) - { - case RTP_PRIO_FIFO: - *ret = SCHED_FIFO; - break; - - case RTP_PRIO_REALTIME: - *ret = SCHED_RR; - break; - - default: - *ret = SCHED_OTHER; - break; - } - - return e; -} - -int ksched_setparam(register_t *ret, struct ksched *ksched, - struct lwp *lp, const struct sched_param *param) -{ - register_t policy; - int e; - - e = getscheduler(&policy, ksched, lp); - - if (e == 0) - { - if (policy == SCHED_OTHER) - e = EINVAL; - else - e = ksched_setscheduler(ret, ksched, lp, policy, param); - } - - return e; -} - -int ksched_getparam(register_t *ret, struct ksched *ksched, - struct lwp *lp, struct sched_param *param) -{ - if (RTP_PRIO_IS_REALTIME(lp->lwp_rtprio.type)) - param->sched_priority = rtpprio_to_p4prio(lp->lwp_rtprio.prio); - - return 0; -} - -/* - * XXX The priority and scheduler modifications should - * be moved into published interfaces in kern/kern_sync. - * - * The permissions to modify process p were checked in "p31b_proc()". - * - */ -int ksched_setscheduler(register_t *ret, struct ksched *ksched, - struct lwp *lp, int policy, const struct sched_param *param) -{ - int e = 0; - struct rtprio rtp; - - switch(policy) - { - case SCHED_RR: - case SCHED_FIFO: - - if (param->sched_priority >= P1B_PRIO_MIN && - param->sched_priority <= P1B_PRIO_MAX) - { - rtp.prio = p4prio_to_rtpprio(param->sched_priority); - rtp.type = (policy == SCHED_FIFO) - ? RTP_PRIO_FIFO : RTP_PRIO_REALTIME; - - lp->lwp_rtprio = rtp; - need_user_resched(); - } - else - e = EPERM; - - - break; - - case SCHED_OTHER: - { - rtp.type = RTP_PRIO_NORMAL; - rtp.prio = p4prio_to_rtpprio(param->sched_priority); - lp->lwp_rtprio = rtp; - - /* XXX Simply revert to whatever we had for last - * normal scheduler priorities. - * This puts a requirement - * on the scheduling code: You must leave the - * scheduling info alone. - */ - need_user_resched(); - } - break; - } - - return e; -} - -int ksched_getscheduler(register_t *ret, struct ksched *ksched, struct lwp *lp) -{ - return getscheduler(ret, ksched, lp); -} - -/* ksched_yield: Yield the CPU. - */ -int ksched_yield(register_t *ret, struct ksched *ksched) -{ - need_user_resched(); - return 0; -} - -int ksched_get_priority_max(register_t*ret, struct ksched *ksched, int policy) -{ - int e = 0; - - switch (policy) - { - case SCHED_FIFO: - case SCHED_RR: - *ret = RTP_PRIO_MAX; - break; - - case SCHED_OTHER: - *ret = PRIO_MAX; - break; - - default: - e = EINVAL; - } - - return e; -} - -int ksched_get_priority_min(register_t *ret, struct ksched *ksched, int policy) -{ - int e = 0; - - switch (policy) - { - case SCHED_FIFO: - case SCHED_RR: - *ret = P1B_PRIO_MIN; - break; - - case SCHED_OTHER: - *ret = PRIO_MIN; - break; - - default: - e = EINVAL; - } - - return e; -} - -int ksched_rr_get_interval(register_t *ret, struct ksched *ksched, - struct lwp *lp, struct timespec *timespec) -{ - *timespec = ksched->rr_interval; - - return 0; -} diff --git a/sys/emulation/posix4/mqueue.h b/sys/emulation/posix4/mqueue.h deleted file mode 100644 index 8dcd14b1a2..0000000000 --- a/sys/emulation/posix4/mqueue.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef _MQUEUE_H_ -#define _MQUEUE_H_ - -/* mqueue.h: POSIX 1003.1b Message Queues */ - -/*- - * Copyright (c) 1996, 1997 - * HD Associates, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by HD Associates, Inc - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL HD ASSOCIATES OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: src/sys/posix4/mqueue.h,v 1.4 1999/12/29 04:55:02 peter Exp $ - * $DragonFly: src/sys/emulation/posix4/Attic/mqueue.h,v 1.3 2003/08/27 06:30:04 rob Exp $ - */ - -#include - -#ifdef _P1003_1B_INCLUDE_MAYBES -#include -#include -#include -#include -#else -struct sigevent; -#endif - -typedef int mqd_t; /* message queue descriptors */ - -struct mq_attr { - long mq_flags; /* message queue flags */ - long mq_maxmsg; /* maximum number of messages */ - long mq_msgsize; /* maximum message size */ - long mq_curmsgs; /* number of messages currently queued */ -}; - -#ifndef _KERNEL - -#include - -__BEGIN_DECLS -mqd_t mq_open (const char *, int oflag, ...); -int mq_close (mqd_t); -int mq_unlink (const char *); -int mq_send (mqd_t, const char *, size_t, unsigned int); -ssize_t mq_receive (mqd_t, char *, size_t, unsigned int *); -int mq_notify (mqd_t, const struct sigevent *); -int mq_setattr (mqd_t, const struct mq_attr *, struct mq_attr *); -int mq_getattr (mqd_t, struct mq_attr *); -__END_DECLS - -#endif - -#endif /* _MQUEUE_H_ */ diff --git a/sys/emulation/posix4/p1003_1b.c b/sys/emulation/posix4/p1003_1b.c deleted file mode 100644 index 6b0799aae4..0000000000 --- a/sys/emulation/posix4/p1003_1b.c +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Copyright (c) 1996, 1997, 1998 - * HD Associates, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by HD Associates, Inc - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL HD ASSOCIATES OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: src/sys/posix4/p1003_1b.c,v 1.5.2.2 2003/03/25 06:13:35 rwatson Exp $ - * $DragonFly: src/sys/emulation/posix4/Attic/p1003_1b.c,v 1.9 2007/02/03 17:05:57 corecode Exp $ - */ - -/* p1003_1b: Real Time common code. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "posix4.h" - -MALLOC_DEFINE(M_P31B, "p1003.1b", "Posix 1003.1B"); - -/* p31b_proc: Return a proc struct corresponding to a pid to operate on. - * - * Enforce permission policy. - * - * The policy is the same as for sending signals except there - * is no notion of process groups. - * - * pid == 0 means my process. - * - * This is disabled until I've got a permission gate in again: - * only root can do this. - */ - -#if 0 -/* - * This is stolen from CANSIGNAL in kern_sig: - * - * Can process p, with pcred pc, do "write flavor" operations to process q? - */ -#define CAN_AFFECT(p, cr, q) \ - ((cr)->cr_uid == 0 || \ - (cr)->cr_ruid == (q)->p_ucred->cr_ruid || \ - (cr)->cr_uid == (q)->p_ucred->cr_ruid || \ - (cr)->cr_ruid == (q)->p_ucred->cr_uid || \ - (cr)->cr_uid == (q)->p_ucred->cr_uid) -#else -#define CAN_AFFECT(p, cr, q) ((cr)->cr_uid == 0) -#endif - -/* - * p31b_proc: Look up a proc from a PID. If proc is 0 it is - * my own proc. - */ -int p31b_proc(struct proc *p, pid_t pid, struct proc **pp) -{ - int ret = 0; - struct proc *other_proc = 0; - - if (pid == 0) - other_proc = p; - else - other_proc = pfind(pid); - - if (other_proc) - { - /* Enforce permission policy. - */ - if (CAN_AFFECT(p, p->p_ucred, other_proc)) - *pp = other_proc; - else - ret = EPERM; - } - else - ret = ESRCH; - - return ret; -} - - -#if !defined(_KPOSIX_PRIORITY_SCHEDULING) - -int syscall_not_present(const char *s); - -/* The system calls return ENOSYS if an entry is called that is - * not run-time supported. I am also logging since some programs - * start to use this when they shouldn't. That will be removed if annoying. - */ -int syscall_not_present(const char *s) -{ - struct proc *p = curproc; - log(LOG_ERR, "cmd %s pid %d tried to use non-present %s\n", - p->p_comm, p->p_pid, s); - - /* a " return nosys(p, uap); " here causes a core dump. - */ - - return ENOSYS; -} - -/* Not configured but loadable via a module: - */ - -static int sched_attach(void) -{ - return 0; -} - -#define SYSCALL_NOT_PRESENT_GEN(SC) \ -int SC (struct SC##_args *uap) \ -{ \ - return syscall_not_present(#SC); \ -} - -SYSCALL_NOT_PRESENT_GEN(sched_setparam) -SYSCALL_NOT_PRESENT_GEN(sched_getparam) -SYSCALL_NOT_PRESENT_GEN(sched_setscheduler) -SYSCALL_NOT_PRESENT_GEN(sched_getscheduler) -SYSCALL_NOT_PRESENT_GEN(sched_yield) -SYSCALL_NOT_PRESENT_GEN(sched_get_priority_max) -SYSCALL_NOT_PRESENT_GEN(sched_get_priority_min) -SYSCALL_NOT_PRESENT_GEN(sched_rr_get_interval) - -#else - -/* Configured in kernel version: - */ -static struct ksched *ksched; - -static int sched_attach(void) -{ - int ret = ksched_attach(&ksched); - - if (ret == 0) - p31b_setcfg(CTL_P1003_1B_PRIORITY_SCHEDULING, 1); - - return ret; -} - -int -sys_sched_setparam(struct sched_setparam_args *uap) -{ - struct proc *p = curproc; - struct lwp *lp; - int e; - - struct sched_param sched_param; - copyin(uap->param, &sched_param, sizeof(sched_param)); - - if ((e = p31b_proc(p, uap->pid, &p)) == 0) { - lp = FIRST_LWP_IN_PROC(p); /* XXX lwp */ - e = ksched_setparam(&uap->sysmsg_result, ksched, lp, - (const struct sched_param *)&sched_param); - } - return e; -} - -int -sys_sched_getparam(struct sched_getparam_args *uap) -{ - struct proc *p = curproc; - struct proc *targetp; - struct lwp *lp; - struct sched_param sched_param; - int e; - - if (uap->pid != 0 && uap->pid != p->p_pid) { - e = p31b_proc(p, uap->pid, &targetp); - if (e) - return e; - } else { - targetp = p; - } - - lp = FIRST_LWP_IN_PROC(targetp); /* XXX lwp */ - e = ksched_getparam(&uap->sysmsg_result, ksched, lp, &sched_param); - - if (!e) - copyout(&sched_param, uap->param, sizeof(sched_param)); - - return e; -} - -int -sys_sched_setscheduler(struct sched_setscheduler_args *uap) -{ - struct proc *p = curproc; - struct lwp *lp; - int e; - - struct sched_param sched_param; - copyin(uap->param, &sched_param, sizeof(sched_param)); - - if ((e = p31b_proc(p, uap->pid, &p)) == 0) { - lp = FIRST_LWP_IN_PROC(p); /* XXX lwp */ - e = ksched_setscheduler(&uap->sysmsg_result, ksched, lp, - uap->policy, (const struct sched_param *)&sched_param); - } - return e; -} - -int -sys_sched_getscheduler(struct sched_getscheduler_args *uap) -{ - struct proc *p = curproc; - struct proc *targetp; - struct lwp *lp; - int e; - - if (uap->pid != 0 && uap->pid != p->p_pid) { - e = p31b_proc(p, uap->pid, &targetp); - if (e) - return e; - } else { - targetp = p; - } - - lp = FIRST_LWP_IN_PROC(targetp); /* XXX lwp */ - e = ksched_getscheduler(&uap->sysmsg_result, ksched, lp); - - return e; -} - -int -sys_sched_yield(struct sched_yield_args *uap) -{ - return ksched_yield(&uap->sysmsg_result, ksched); -} - -int -sys_sched_get_priority_max(struct sched_get_priority_max_args *uap) -{ - return ksched_get_priority_max(&uap->sysmsg_result, ksched, uap->policy); -} - -int -sys_sched_get_priority_min(struct sched_get_priority_min_args *uap) -{ - return ksched_get_priority_min(&uap->sysmsg_result, ksched, uap->policy); -} - -int -sys_sched_rr_get_interval(struct sched_rr_get_interval_args *uap) -{ - int e; - struct proc *p = curproc; - struct lwp *lp = curthread->td_lwp; - - if ((e = p31b_proc(p, uap->pid, &p)) == 0) { - e = ksched_rr_get_interval(&uap->sysmsg_result, ksched, - lp, uap->interval); - } - return e; -} - -#endif - -static void p31binit(void *notused) -{ - (void) sched_attach(); - p31b_setcfg(CTL_P1003_1B_PAGESIZE, PAGE_SIZE); -} - -SYSINIT(p31b, SI_SUB_P1003_1B, SI_ORDER_FIRST, p31binit, NULL); diff --git a/sys/emulation/posix4/posix4.h b/sys/emulation/posix4/posix4.h deleted file mode 100644 index 590c40c92d..0000000000 --- a/sys/emulation/posix4/posix4.h +++ /dev/null @@ -1,105 +0,0 @@ -#ifndef _P1003_1B_P1003_1B_H_ -#define _P1003_1B_P1003_1B_H_ -/*- - * Copyright (c) 1996, 1997, 1998 - * HD Associates, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by HD Associates, Inc - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL HD ASSOCIATES OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: src/sys/posix4/posix4.h,v 1.6 1999/12/27 10:22:09 bde Exp $ - * $DragonFly: src/sys/emulation/posix4/Attic/posix4.h,v 1.7 2007/02/03 17:05:57 corecode Exp $ - */ - -#include "opt_posix.h" - -#include -#include -#include -#include "sched.h" - -MALLOC_DECLARE(M_P31B); - -#define p31b_malloc(SIZE) kmalloc((SIZE), M_P31B, M_WAITOK) -#define p31b_free(P) kfree((P), M_P31B) - -struct proc; -struct lwp; - -int p31b_proc (struct proc *, pid_t, struct proc **); - -void p31b_setcfg (int, int); - -#ifdef _KPOSIX_PRIORITY_SCHEDULING - -/* - * KSCHED_OP_RW is a vector of read/write flags for each entry indexed - * by the enum ksched_op. - * - * 1 means you need write access, 0 means read is sufficient. - */ - -enum ksched_op { - -#define KSCHED_OP_RW { 1, 0, 1, 0, 0, 0, 0, 0 } - - SCHED_SETPARAM, - SCHED_GETPARAM, - SCHED_SETSCHEDULER, - SCHED_GETSCHEDULER, - SCHED_YIELD, - SCHED_GET_PRIORITY_MAX, - SCHED_GET_PRIORITY_MIN, - SCHED_RR_GET_INTERVAL, - SCHED_OP_MAX -}; - -struct ksched; - -int ksched_attach(struct ksched **); -int ksched_detach(struct ksched *); - -int ksched_setparam(register_t *, struct ksched *, - struct lwp *, const struct sched_param *); -int ksched_getparam(register_t *, struct ksched *, - struct lwp *, struct sched_param *); - -int ksched_setscheduler(register_t *, struct ksched *, - struct lwp *, int, const struct sched_param *); -int ksched_getscheduler(register_t *, struct ksched *, struct lwp *); - -int ksched_yield(register_t *, struct ksched *); - -int ksched_get_priority_max(register_t *, struct ksched *, int); -int ksched_get_priority_min(register_t *, struct ksched *, int); - -int ksched_rr_get_interval(register_t *, struct ksched *, - struct lwp *, struct timespec *); - -#endif /* _KPOSIX_PRIORITY_SCHEDULING */ - -#endif /* _P1003_1B_P1003_1B_H_ */ diff --git a/sys/emulation/posix4/posix4_mib.c b/sys/emulation/posix4/posix4_mib.c deleted file mode 100644 index 61d5de0cb4..0000000000 --- a/sys/emulation/posix4/posix4_mib.c +++ /dev/null @@ -1,100 +0,0 @@ -/*- - * Copyright (c) 1998 - * HD Associates, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by HD Associates, Inc - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL HD ASSOCIATES OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: src/sys/posix4/posix4_mib.c,v 1.3.2.1 2000/08/03 01:09:59 peter Exp $ - * $DragonFly: src/sys/emulation/posix4/Attic/posix4_mib.c,v 1.3 2003/08/07 21:17:19 dillon Exp $ - */ - -#include -#include -#include -#include -#include "posix4.h" - -static int facility[CTL_P1003_1B_MAXID - 1]; - -/* OID_AUTO isn't working with sysconf(3). I guess I'd have to - * modify it to do a lookup by name from the index. - * For now I've left it a top-level sysctl. - */ - -#if 1 - -SYSCTL_DECL(_p1003_1b); - -#define P1B_SYSCTL(num, name) \ -SYSCTL_INT(_p1003_1b, num, \ - name, CTLFLAG_RD, facility + num - 1, 0, ""); - -#else - -SYSCTL_DECL(_kern_p1003_1b); - -#define P1B_SYSCTL(num, name) \ -SYSCTL_INT(_kern_p1003_1b, OID_AUTO, \ - name, CTLFLAG_RD, facility + num - 1, 0, ""); -SYSCTL_NODE(_kern, OID_AUTO, p1003_1b, CTLFLAG_RW, 0, "P1003.1B"); - -#endif - -P1B_SYSCTL(CTL_P1003_1B_ASYNCHRONOUS_IO, asynchronous_io); -P1B_SYSCTL(CTL_P1003_1B_MAPPED_FILES, mapped_files); -P1B_SYSCTL(CTL_P1003_1B_MEMLOCK, memlock); -P1B_SYSCTL(CTL_P1003_1B_MEMLOCK_RANGE, memlock_range); -P1B_SYSCTL(CTL_P1003_1B_MEMORY_PROTECTION, memory_protection); -P1B_SYSCTL(CTL_P1003_1B_MESSAGE_PASSING, message_passing); -P1B_SYSCTL(CTL_P1003_1B_PRIORITIZED_IO, prioritized_io); -P1B_SYSCTL(CTL_P1003_1B_PRIORITY_SCHEDULING, priority_scheduling); -P1B_SYSCTL(CTL_P1003_1B_REALTIME_SIGNALS, realtime_signals); -P1B_SYSCTL(CTL_P1003_1B_SEMAPHORES, semaphores); -P1B_SYSCTL(CTL_P1003_1B_FSYNC, fsync); -P1B_SYSCTL(CTL_P1003_1B_SHARED_MEMORY_OBJECTS, shared_memory_objects); -P1B_SYSCTL(CTL_P1003_1B_SYNCHRONIZED_IO, synchronized_io); -P1B_SYSCTL(CTL_P1003_1B_TIMERS, timers); -P1B_SYSCTL(CTL_P1003_1B_AIO_LISTIO_MAX, aio_listio_max); -P1B_SYSCTL(CTL_P1003_1B_AIO_MAX, aio_max); -P1B_SYSCTL(CTL_P1003_1B_AIO_PRIO_DELTA_MAX, aio_prio_delta_max); -P1B_SYSCTL(CTL_P1003_1B_DELAYTIMER_MAX, delaytimer_max); -P1B_SYSCTL(CTL_P1003_1B_MQ_OPEN_MAX, mq_open_max); -P1B_SYSCTL(CTL_P1003_1B_PAGESIZE, pagesize); -P1B_SYSCTL(CTL_P1003_1B_RTSIG_MAX, rtsig_max); -P1B_SYSCTL(CTL_P1003_1B_SEM_NSEMS_MAX, sem_nsems_max); -P1B_SYSCTL(CTL_P1003_1B_SEM_VALUE_MAX, sem_value_max); -P1B_SYSCTL(CTL_P1003_1B_SIGQUEUE_MAX, sigqueue_max); -P1B_SYSCTL(CTL_P1003_1B_TIMER_MAX, timer_max); - -/* p31b_setcfg: Set the configuration - */ -void p31b_setcfg(int num, int value) -{ - if (num >= 1 && num < CTL_P1003_1B_MAXID) - facility[num - 1] = value; -} diff --git a/sys/emulation/posix4/sched.h b/sys/emulation/posix4/sched.h deleted file mode 100644 index 83743fc07e..0000000000 --- a/sys/emulation/posix4/sched.h +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef _SCHED_H_ -#define _SCHED_H_ - -/* sched.h: POSIX 1003.1b Process Scheduling header */ - -/*- - * Copyright (c) 1996, 1997 - * HD Associates, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by HD Associates, Inc - * and Jukka Antero Ukkonen. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL HD ASSOCIATES OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: src/sys/posix4/sched.h,v 1.4 1999/12/29 04:55:02 peter Exp $ - * $DragonFly: src/sys/emulation/posix4/Attic/sched.h,v 1.3 2003/08/27 06:30:04 rob Exp $ - */ - -#include /* For pid_t */ - -#ifndef _KERNEL -#include /* Per P1003.4 */ -#endif - -/* Scheduling policies - */ -#define SCHED_FIFO 1 -#define SCHED_OTHER 2 -#define SCHED_RR 3 - -struct sched_param -{ - int sched_priority; -}; - -#ifndef _KERNEL -#include - -__BEGIN_DECLS -int sched_setparam (pid_t, const struct sched_param *); -int sched_getparam (pid_t, struct sched_param *); - -int sched_setscheduler (pid_t, int, const struct sched_param *); -int sched_getscheduler (pid_t); - -int sched_yield (void); -int sched_get_priority_max (int); -int sched_get_priority_min (int); -int sched_rr_get_interval (pid_t, struct timespec *); -__END_DECLS - -#endif - -#endif /* _SCHED_H_ */ diff --git a/sys/emulation/posix4/semaphore.h b/sys/emulation/posix4/semaphore.h deleted file mode 100644 index 7e956a38f2..0000000000 --- a/sys/emulation/posix4/semaphore.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef _SEMAPHORE_H_ -#define _SEMAPHORE_H_ - -/* semaphore.h: POSIX 1003.1b semaphores */ - -/*- - * Copyright (c) 1996, 1997 - * HD Associates, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by HD Associates, Inc - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL HD ASSOCIATES OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: src/sys/posix4/semaphore.h,v 1.6 2000/01/20 07:55:42 jasone Exp $ - * $DragonFly: src/sys/emulation/posix4/Attic/semaphore.h,v 1.3 2003/08/27 06:30:04 rob Exp $ - */ - -#include -#include - -#ifdef _P1003_1B_INCLUDE_MAYBES -#include -#include -#endif - -/* Opaque type definition. */ -struct sem; -typedef struct sem *sem_t; - -#define SEM_FAILED ((sem_t *)0) -#define SEM_VALUE_MAX UINT_MAX - -#ifndef _KERNEL -#include - -__BEGIN_DECLS -int sem_init (sem_t *, int, unsigned int); -int sem_destroy (sem_t *); -sem_t *sem_open (const char *, int, ...); -int sem_close (sem_t *); -int sem_unlink (const char *); -int sem_wait (sem_t *); -int sem_trywait (sem_t *); -int sem_post (sem_t *); -int sem_getvalue (sem_t *, int *); -__END_DECLS - -#endif - -#endif /* _SEMAPHORE_H_ */ diff --git a/sys/kern/kern_p1003_1b.c b/sys/kern/kern_p1003_1b.c index e7d4561f37..bbb5b39d19 100644 --- a/sys/kern/kern_p1003_1b.c +++ b/sys/kern/kern_p1003_1b.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/posix4/p1003_1b.c,v 1.5.2.2 2003/03/25 06:13:35 rwatson Exp $ - * $DragonFly: src/sys/kern/kern_p1003_1b.c,v 1.9 2007/02/03 17:05:57 corecode Exp $ + * $DragonFly: src/sys/kern/kern_p1003_1b.c,v 1.10 2007/06/26 19:31:08 dillon Exp $ */ /* p1003_1b: Real Time common code. @@ -40,14 +40,13 @@ #include #include #include +#include #include #include #include #include #include -#include "posix4.h" - MALLOC_DEFINE(M_P31B, "p1003.1b", "Posix 1003.1B"); /* p31b_proc: Return a proc struct corresponding to a pid to operate on. diff --git a/sys/kern/kern_posix4_mib.c b/sys/kern/kern_posix4_mib.c index d570411a2c..543a6af720 100644 --- a/sys/kern/kern_posix4_mib.c +++ b/sys/kern/kern_posix4_mib.c @@ -30,14 +30,14 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/posix4/posix4_mib.c,v 1.3.2.1 2000/08/03 01:09:59 peter Exp $ - * $DragonFly: src/sys/kern/kern_posix4_mib.c,v 1.3 2003/08/07 21:17:19 dillon Exp $ + * $DragonFly: src/sys/kern/kern_posix4_mib.c,v 1.4 2007/06/26 19:31:08 dillon Exp $ */ #include #include #include #include -#include "posix4.h" +#include static int facility[CTL_P1003_1B_MAXID - 1]; diff --git a/sys/kern/kern_sched.c b/sys/kern/kern_sched.c index 9221400928..971522332d 100644 --- a/sys/kern/kern_sched.c +++ b/sys/kern/kern_sched.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/posix4/ksched.c,v 1.7.2.1 2000/05/16 06:58:13 dillon Exp $ - * $DragonFly: src/sys/kern/kern_sched.c,v 1.8 2007/02/03 17:05:57 corecode Exp $ + * $DragonFly: src/sys/kern/kern_sched.c,v 1.9 2007/06/26 19:31:08 dillon Exp $ */ /* ksched: Soft real time scheduling based on "rtprio". @@ -38,12 +38,12 @@ #include #include +#include #include #include #include #include /* For need_user_resched */ -#include "posix4.h" /* ksched: Real-time extension to support POSIX priority scheduling. */ diff --git a/sys/sys/posix4.h b/sys/sys/posix4.h index a4a3af60e9..5d2c57266c 100644 --- a/sys/sys/posix4.h +++ b/sys/sys/posix4.h @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/posix4/posix4.h,v 1.6 1999/12/27 10:22:09 bde Exp $ - * $DragonFly: src/sys/sys/posix4.h,v 1.7 2007/02/03 17:05:57 corecode Exp $ + * $DragonFly: src/sys/sys/posix4.h,v 1.8 2007/06/26 19:31:10 dillon Exp $ */ #include "opt_posix.h" @@ -40,7 +40,7 @@ #include #include #include -#include "sched.h" +#include MALLOC_DECLARE(M_P31B); -- 2.41.0