The return value for Linux shmat on amd64 does not suffer the same horrible

hack as on i386.
This commit is contained in:
manu 2006-08-24 16:36:59 +00:00
parent a4f2ed9867
commit 432f035fa6
6 changed files with 18 additions and 23 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_syscall.h,v 1.13 2006/06/25 16:16:52 manu Exp $ */
/* $NetBSD: linux_syscall.h,v 1.14 2006/08/24 16:36:59 manu Exp $ */
/*
* System call numbers.
@ -101,7 +101,7 @@
/* syscall: "shmget" ret: "int" args: "key_t" "size_t" "int" */
#define LINUX_SYS_shmget 29
/* syscall: "shmat" ret: "int" args: "int" "void *" "int" "u_long *" */
/* syscall: "shmat" ret: "int" args: "int" "void *" "int" */
#define LINUX_SYS_shmat 30
/* syscall: "shmctl" ret: "int" args: "int" "int" "struct linux_shmid_ds *" */

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_syscallargs.h,v 1.13 2006/06/25 16:16:52 manu Exp $ */
/* $NetBSD: linux_syscallargs.h,v 1.14 2006/08/24 16:36:59 manu Exp $ */
/*
* System call argument lists.
@ -129,13 +129,6 @@ struct linux_sys_shmget_args {
syscallarg(int) shmflg;
};
struct linux_sys_shmat_args {
syscallarg(int) shmid;
syscallarg(void *) shmaddr;
syscallarg(int) shmflg;
syscallarg(u_long *) raddr;
};
struct linux_sys_shmctl_args {
syscallarg(int) shmid;
syscallarg(int) cmd;
@ -789,7 +782,7 @@ int sys_madvise(struct lwp *, void *, register_t *);
#ifdef SYSVSHM
int linux_sys_shmget(struct lwp *, void *, register_t *);
int linux_sys_shmat(struct lwp *, void *, register_t *);
int sys_shmat(struct lwp *, void *, register_t *);
int linux_sys_shmctl(struct lwp *, void *, register_t *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_syscalls.c,v 1.13 2006/06/25 16:16:52 manu Exp $ */
/* $NetBSD: linux_syscalls.c,v 1.14 2006/08/24 16:36:59 manu Exp $ */
/*
* System call names.
@ -8,7 +8,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.13 2006/06/25 16:16:52 manu Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.14 2006/08/24 16:36:59 manu Exp $");
#if defined(_KERNEL_OPT)
#if defined(_KERNEL_OPT)

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_sysent.c,v 1.13 2006/06/25 16:16:52 manu Exp $ */
/* $NetBSD: linux_sysent.c,v 1.14 2006/08/24 16:36:59 manu Exp $ */
/*
* System call switch table.
@ -8,7 +8,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.13 2006/06/25 16:16:52 manu Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.14 2006/08/24 16:36:59 manu Exp $");
#if defined(_KERNEL_OPT)
#include "opt_sysv.h"
@ -94,8 +94,8 @@ struct sysent linux_sysent[] = {
#ifdef SYSVSHM
{ 3, s(struct linux_sys_shmget_args), 0,
linux_sys_shmget }, /* 29 = shmget */
{ 4, s(struct linux_sys_shmat_args), 0,
linux_sys_shmat }, /* 30 = shmat */
{ 3, s(struct sys_shmat_args), 0,
sys_shmat }, /* 30 = shmat */
{ 3, s(struct linux_sys_shmctl_args), 0,
linux_sys_shmctl }, /* 31 = shmctl */
#else

View File

@ -1,4 +1,4 @@
$NetBSD: syscalls.master,v 1.12 2006/06/25 16:15:39 manu Exp $
$NetBSD: syscalls.master,v 1.13 2006/08/24 16:36:59 manu Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@ -111,9 +111,9 @@
27 NOARGS { int sys_mincore(void *addr, size_t len, char *vec); }
28 NOARGS { int sys_madvise(void *addr, size_t len, int behav); }
#ifdef SYSVSHM
29 STD { int linux_sys_shmget(key_t key, size_t size, int shmflg); }
30 STD { int linux_sys_shmat(int shmid, void *shmaddr, \
int shmflg, u_long *raddr); }
29 STD { int linux_sys_shmget(key_t key, size_t size, \
int shmflg); }
30 NOARGS { int sys_shmat(int shmid, void *shmaddr, int shmflg); }
31 STD { int linux_sys_shmctl(int shmid, int cmd, \
struct linux_shmid_ds *buf); }
#else

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_ipc.c,v 1.35 2006/07/23 22:06:09 ad Exp $ */
/* $NetBSD: linux_ipc.c,v 1.36 2006/08/24 16:36:59 manu Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_ipc.c,v 1.35 2006/07/23 22:06:09 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_ipc.c,v 1.36 2006/08/24 16:36:59 manu Exp $");
#if defined(_KERNEL_OPT)
#include "opt_sysv.h"
@ -407,6 +407,7 @@ linux_sys_shmget(l, v, retval)
* in which the return value is to be passed. This is subsequently
* handled by libc, apparently.
*/
#ifndef __amd64__
int
linux_sys_shmat(l, v, retval)
struct lwp *l;
@ -431,6 +432,7 @@ linux_sys_shmat(l, v, retval)
retval[0] = 0;
return 0;
}
#endif /* __amd64__ */
/*
* Convert between Linux and NetBSD shmid_ds structures.