From 58acdd095c1ac25ac70f9992f1aca1b76d8acc9c Mon Sep 17 00:00:00 2001 From: sos Date: Fri, 29 Dec 1995 22:12:14 +0000 Subject: My first shot at get sound to work on the emulator. Inspired by the work Amancio Hasty has done, but implemented somewhat differently. --- sys/i386/linux/linux_ipc.c | 50 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 5 deletions(-) (limited to 'sys/i386/linux/linux_ipc.c') diff --git a/sys/i386/linux/linux_ipc.c b/sys/i386/linux/linux_ipc.c index 8327b20..4973c8d 100644 --- a/sys/i386/linux/linux_ipc.c +++ b/sys/i386/linux/linux_ipc.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_ipc.c,v 1.2 1995/11/22 07:43:47 bde Exp $ + * $Id: linux_ipc.c,v 1.3 1995/12/15 05:07:20 peter Exp $ */ #include @@ -143,25 +143,65 @@ linux_semctl(struct proc *p, struct linux_ipc_args *args, int *retval) int linux_msgsnd(struct proc *p, struct linux_ipc_args *args, int *retval) { - return ENOSYS; + struct msgsnd_args /* { + int msqid; + void *msgp; + size_t msgsz; + int msgflg; + } */ bsd_args; + + bsd_args.msqid = args->arg1; + bsd_args.msgp = args->ptr; + bsd_args.msgsz = args->arg2; + bsd_args.msgflg = args->arg3; + return msgsnd(p, &bsd_args, retval); } int linux_msgrcv(struct proc *p, struct linux_ipc_args *args, int *retval) { - return ENOSYS; + struct msgrcv_args /* { + int msqid; + void *msgp; + size_t msgsz; + long msgtyp; + int msgflg; + } */ bsd_args; + + bsd_args.msqid = args->arg1; + bsd_args.msgp = args->ptr; + bsd_args.msgsz = args->arg2; + bsd_args.msgtyp = 0; + bsd_args.msgflg = args->arg3; + return msgrcv(p, &bsd_args, retval); } int linux_msgget(struct proc *p, struct linux_ipc_args *args, int *retval) { - return ENOSYS; + struct msgget_args /* { + key_t key; + int msgflg; + } */ bsd_args; + + bsd_args.key = args->arg1; + bsd_args.msgflg = args->arg2; + return msgget(p, &bsd_args, retval); } int linux_msgctl(struct proc *p, struct linux_ipc_args *args, int *retval) { - return ENOSYS; + struct msgctl_args /* { + int msqid; + int cmd; + struct msqid_ds *buf; + } */ bsd_args; + + bsd_args.msqid = args->arg1; + bsd_args.cmd = args->arg2; + bsd_args.buf = (struct msqid_ds *)args->ptr; + return msgctl(p, &bsd_args, retval); } int -- cgit v1.1