linux_ipc.c (108541) | linux_ipc.c (111797) |
---|---|
1/*- 2 * Copyright (c) 1994-1995 S�ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 1994-1995 S�ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/sys/compat/linux/linux_ipc.c 108541 2003-01-02 02:19:10Z alfred $ | 28 * $FreeBSD: head/sys/compat/linux/linux_ipc.c 111797 2003-03-03 09:14:26Z des $ |
29 */ 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/sysproto.h> 34#include <sys/proc.h> 35#include <sys/msg.h> 36#include <sys/sem.h> --- 503 unchanged lines hidden (view full) --- 540 case LINUX_SEM_INFO: 541 bcopy(&seminfo, &linux_seminfo, sizeof(linux_seminfo) ); 542/* XXX BSD equivalent? 543#define used_semids 10 544#define used_sems 10 545 linux_seminfo.semusz = used_semids; 546 linux_seminfo.semaem = used_sems; 547*/ | 29 */ 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/sysproto.h> 34#include <sys/proc.h> 35#include <sys/msg.h> 36#include <sys/sem.h> --- 503 unchanged lines hidden (view full) --- 540 case LINUX_SEM_INFO: 541 bcopy(&seminfo, &linux_seminfo, sizeof(linux_seminfo) ); 542/* XXX BSD equivalent? 543#define used_semids 10 544#define used_sems 10 545 linux_seminfo.semusz = used_semids; 546 linux_seminfo.semaem = used_sems; 547*/ |
548 error = copyout((caddr_t)&linux_seminfo, (caddr_t)args->arg.buf, 549 sizeof(linux_seminfo) ); | 548 error = copyout(&linux_seminfo, args->arg.buf, 549 sizeof(linux_seminfo)); |
550 if (error) 551 return error; 552 td->td_retval[0] = seminfo.semmni; 553 return 0; /* No need for __semctl call */ 554 case LINUX_GETALL: 555 /* FALLTHROUGH */ 556 case LINUX_SETALL: 557 /* FALLTHROUGH */ --- 102 unchanged lines hidden (view full) --- 660 int error; 661 662 bsd_args.shmid = args->shmid; 663 bsd_args.shmaddr = args->shmaddr; 664 bsd_args.shmflg = args->shmflg; 665 if ((error = shmat(td, &bsd_args))) 666 return error; 667#ifdef __i386__ | 550 if (error) 551 return error; 552 td->td_retval[0] = seminfo.semmni; 553 return 0; /* No need for __semctl call */ 554 case LINUX_GETALL: 555 /* FALLTHROUGH */ 556 case LINUX_SETALL: 557 /* FALLTHROUGH */ --- 102 unchanged lines hidden (view full) --- 660 int error; 661 662 bsd_args.shmid = args->shmid; 663 bsd_args.shmaddr = args->shmaddr; 664 bsd_args.shmflg = args->shmflg; 665 if ((error = shmat(td, &bsd_args))) 666 return error; 667#ifdef __i386__ |
668 if ((error = copyout(td->td_retval, (caddr_t)args->raddr, sizeof(l_ulong)))) | 668 if ((error = copyout(td->td_retval, args->raddr, sizeof(l_ulong)))) |
669 return error; 670 td->td_retval[0] = 0; 671#endif 672 return 0; 673} 674 675int 676linux_shmdt(struct thread *td, struct linux_shmdt_args *args) --- 113 unchanged lines hidden --- | 669 return error; 670 td->td_retval[0] = 0; 671#endif 672 return 0; 673} 674 675int 676linux_shmdt(struct thread *td, struct linux_shmdt_args *args) --- 113 unchanged lines hidden --- |