This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH]: Fix sparc64/linux semctl().
- From: David Miller <davem at davemloft dot net>
- To: libc-alpha at sourceware dot org
- Cc: jakub at redhat dot com
- Date: Tue, 29 Apr 2008 03:57:11 -0700 (PDT)
- Subject: Re: [PATCH]: Fix sparc64/linux semctl().
- References: <20080425.232102.226782573.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Fri, 25 Apr 2008 23:21:02 -0700 (PDT)
> On sparc64, unions and small structures are passed in register
> arguments, not by reference.
>
> So, like Alpha, we have to pass the "union semun" object in
> properly to match those semantics.
>
> Please apply, thanks!
Ping?
> 2008-04-25 David S. Miller <davem@davemloft.net>
>
> * sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c (semctl):
> Pass "union semun" properly in to sys_ipc, it must be passed
> by value, not by reference.
>
> diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c b/sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c
> index 057e287..4f826b1 100644
> --- a/sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c
> +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c
> @@ -54,5 +54,5 @@ semctl (int semid, int semnum, int cmd, ...)
> va_end (ap);
>
> return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
> - CHECK_SEMCTL (&arg, semid, cmd));
> + CHECK_SEMCTL (&arg, semid, cmd)->array);
> }