This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 08/11] nds32: Linux ABI
On 09/05/2018 10:34, Vincent Chen wrote:
> On Wed, May 09, 2018 at 05:18:41AM +0800, Adhemerval Zanella wrote:
>>
>>
>> On 06/05/2018 11:41, vincentc wrote:
>>> diff --git a/sysdeps/unix/sysv/linux/nds32/ipc_priv.h b/sysdeps/unix/sysv/linux/nds32/ipc_priv.h
>>> new file mode 100644
>>> index 0000000..e0732b9
>>> --- /dev/null
>>> +++ b/sysdeps/unix/sysv/linux/nds32/ipc_priv.h
>>> @@ -0,0 +1,22 @@
>>> +/* Old SysV permission definition for Linux, Andes nds32 version.
>>> + Copyright (C) 2018 Free Software Foundation, Inc.
>>> + This file is part of the GNU C Library.
>>> +
>>> + The GNU C Library is free software; you can redistribute it and/or
>>> + modify it under the terms of the GNU Lesser General Public
>>> + License as published by the Free Software Foundation; either
>>> + version 2.1 of the License, or (at your option) any later version.
>>> +
>>> + The GNU C Library is distributed in the hope that it will be useful,
>>> + but WITHOUT ANY WARRANTY; without even the implied warranty of
>>> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
>>> + Lesser General Public License for more details.
>>> +
>>> + You should have received a copy of the GNU Lesser General Public
>>> + License along with the GNU C Library; if not, see
>>> + <http://www.gnu.org/licenses/>. */
>>> +
>>> +#include <sys/ipc.h> /* For __key_t. */
>>> +
>>> +#define __IPC_64 0x0
>>> +
>>
>> My understanding was generic uapi for Linux expects IPC_64 being 0x100 for
>> newer ports, but seems for recent ones that 0x0 is the expect values. Is
>> the case or NDS32 is a outlier?
>>
>
>
> For new ports of Linux, only new IPC version is supported. Therefore, kernel
> does not identify the IPC version by __IPC_64 flag. Unfortunately, kernel also
> skip the code for removing __IPC_64 flag from cmd. Therefore, -EINVAL is returned
> if __IPC_64 is set. To solve this problem, we set __IPC_64 as 0x0 instead of
> 0x100.
Right, so I think a future cleanup could to define the generic ipc_priv.h to
define __IPC_64 set to 0x0 then. Thanks for the info.