diff options
author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1998-02-19 00:37:34 +0000 |
---|---|---|
committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1998-02-19 00:37:34 +0000 |
commit | 02acb6c49c29a6f3186ad8ecc92f5ca6e5f80c31 (patch) | |
tree | c7757b3ffde28954521756641e80dd6e5516fcf1 | |
parent | ae38c4b1990b1e253c21b857695b5afb880ffec4 (diff) |
Notes
-rw-r--r-- | sys/i386/linux/linux.h | 16 | ||||
-rw-r--r-- | sys/i386/linux/linux_dummy.c | 9 | ||||
-rw-r--r-- | sys/i386/linux/linux_ioctl.c | 18 | ||||
-rw-r--r-- | sys/i386/linux/linux_misc.c | 14 | ||||
-rw-r--r-- | sys/i386/linux/linux_proto.h | 2 |
5 files changed, 47 insertions, 12 deletions
diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h index 19afd89acd005..9513589b7adee 100644 --- a/sys/i386/linux/linux.h +++ b/sys/i386/linux/linux.h @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux.h,v 1.10.2.4 1997/06/02 06:47:38 msmith Exp $ + * $Id: linux.h,v 1.10.2.5 1997/12/15 06:11:34 msmith Exp $ */ #ifndef _I386_LINUX_LINUX_H_ @@ -434,6 +434,15 @@ struct trapframe; #define LINUX_SHM_RND 0x2000 #define LINUX_SHM_REMAP 0x4000 +/* semctl Command Definitions. */ +#define LINUX_GETPID 11 +#define LINUX_GETVAL 12 +#define LINUX_GETALL 13 +#define LINUX_GETNCNT 14 +#define LINUX_GETZCNT 15 +#define LINUX_SETVAL 16 +#define LINUX_SETALL 17 + /* Socket defines */ #define LINUX_SOCKET 1 #define LINUX_BIND 2 @@ -507,6 +516,11 @@ struct trapframe; #define LINUX_SNDCTL_DSP_GETOSPACE 0x500C #define LINUX_SNDCTL_DSP_GETISPACE 0x500D #define LINUX_SNDCTL_DSP_NONBLOCK 0x500E +#define LINUX_SNDCTL_DSP_GETCAPS 0x500F +#define LINUX_SNDCTL_DSP_GETTRIGGER 0x5010 +#define LINUX_SNDCTL_DSP_SETTRIGGER 0x5010 +#define LINUX_SNDCTL_DSP_GETIPTR 0x5011 +#define LINUX_SNDCTL_DSP_GETOPTR 0x5012 #define LINUX_SOUND_MIXER_WRITE_VOLUME 0x4d00 #define LINUX_SOUND_MIXER_WRITE_BASS 0x4d01 #define LINUX_SOUND_MIXER_WRITE_TREBLE 0x4d02 diff --git a/sys/i386/linux/linux_dummy.c b/sys/i386/linux/linux_dummy.c index 2fcab4616a39c..da1a70c857e87 100644 --- a/sys/i386/linux/linux_dummy.c +++ b/sys/i386/linux/linux_dummy.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_dummy.c,v 1.2 1995/11/22 07:43:44 bde Exp $ + * $Id: linux_dummy.c,v 1.3 1996/03/02 19:37:52 peter Exp $ */ #include <sys/param.h> @@ -108,13 +108,6 @@ linux_gtty(struct proc *p, struct linux_gtty_args *args, int *retval) } int -linux_nice(struct proc *p, struct linux_nice_args *args, int *retval) -{ - printf("Linux-emul(%d): nice() not supported\n", p->p_pid); - return ENOSYS; -} - -int linux_ftime(struct proc *p, struct linux_ftime_args *args, int *retval) { printf("Linux-emul(%d): ftime() not supported\n", p->p_pid); diff --git a/sys/i386/linux/linux_ioctl.c b/sys/i386/linux/linux_ioctl.c index cef8b40a3494b..86c1c5796651e 100644 --- a/sys/i386/linux/linux_ioctl.c +++ b/sys/i386/linux/linux_ioctl.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_ioctl.c,v 1.11.2.3 1997/12/15 06:11:34 msmith Exp $ + * $Id: linux_ioctl.c,v 1.11.2.4 1997/12/15 21:36:41 msmith Exp $ */ #include <sys/param.h> @@ -665,6 +665,22 @@ linux_ioctl(struct proc *p, struct linux_ioctl_args *args, int *retval) return copyout(&linux_line, (caddr_t)args->arg, sizeof(int)); + case LINUX_SNDCTL_DSP_GETOPTR : + args->cmd = SNDCTL_DSP_GETOPTR; + return ioctl(p, (struct ioctl_args *)args, retval); + + case LINUX_SNDCTL_DSP_GETIPTR : + args->cmd = SNDCTL_DSP_GETIPTR; + return ioctl(p, (struct ioctl_args *)args, retval); + + case LINUX_SNDCTL_DSP_SETTRIGGER: + args->cmd = SNDCTL_DSP_SETTRIGGER; + return ioctl(p, (struct ioctl_args *)args, retval); + + case LINUX_SNDCTL_DSP_GETCAPS: + args->cmd = SNDCTL_DSP_GETCAPS; + return ioctl(p, (struct ioctl_args *)args, retval); + case LINUX_SNDCTL_DSP_RESET: args->cmd = SNDCTL_DSP_RESET; return ioctl(p, (struct ioctl_args *)args, retval); diff --git a/sys/i386/linux/linux_misc.c b/sys/i386/linux/linux_misc.c index 1fb65c7b753e7..61786da397424 100644 --- a/sys/i386/linux/linux_misc.c +++ b/sys/i386/linux/linux_misc.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_misc.c,v 1.20 1996/06/12 05:06:28 gpalmer Exp $ + * $Id: linux_misc.c,v 1.20.2.1 1997/04/28 02:55:10 msmith Exp $ */ #include <sys/param.h> @@ -939,3 +939,15 @@ linux_getitimer(struct proc *p, struct linux_getitimer_args *args, int *retval) bsa.itv = args->itv; return getitimer(p, &bsa, retval); } + +int +linux_nice(struct proc *p, struct linux_nice_args *args, int *retval) +{ + struct setpriority_args bsd_args; + + bsd_args.which = PRIO_PROCESS; + bsd_args.who = 0; /* current process */ + bsd_args.prio = args->inc; + return setpriority(p, &bsd_args, retval); +} + diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index ba0a87041b472..8641b6ac8f970 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -109,7 +109,7 @@ struct linux_access_args { int flags; }; struct linux_nice_args { - int dummy; + int inc; }; struct linux_ftime_args { int dummy; |