This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 3/5] sysvipc: Consolidate semtimedop s390
On 16/05/2019 12:41, Florian Weimer wrote:
> * Adhemerval Zanella:
>
>> diff --git a/sysdeps/unix/sysv/linux/ipc_priv.h b/sysdeps/unix/sysv/linux/ipc_priv.h
>> index 65adbb093e..49018c1b28 100644
>> --- a/sysdeps/unix/sysv/linux/ipc_priv.h
>> +++ b/sysdeps/unix/sysv/linux/ipc_priv.h
>> @@ -34,4 +34,7 @@ struct __old_ipc_perm
>> #define MSGRCV_ARGS(__msgp, __msgtyp) \
>> ((long int []){ (long int) __msgp, __msgtyp })
>>
>> +#define SEMTIMEDOP_IPC_ARGS(__nsops, __sops, __timeout) \
>> + (__nsops), 0, (__sops), (__timeout)
>
> Maybe add a reference to the s390 version?
What about:
/* This macro is required to handle the s390 variants, which passes the
arguments in a different order than default. */
>
>> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/ipc_priv.h b/sysdeps/unix/sysv/linux/s390/s390-32/ipc_priv.h
>> new file mode 100644
>> index 0000000000..9d74e92289
>
>> +/* The s390 sys_ipc variant has only five parameters instead of six
>> + (as for default variant) and the only difference is the handling of
>> + SEMTIMEDOP where on s390 the third parameter is used as a pointer
>> + to a struct timespec where the generic variant uses fifth parameter. */
>> +#undef SEMTIMEDOP_IPC_ARGS
>> +#define SEMTIMEDOP_IPC_ARGS(__nsops, __sops, __timeout) \
>> + (__nsops), (__timeout), (__sops)
>
> I find “and the only difference is” a bit confusing here. Maybe write
> “. The difference is” instead?
Ack, I change it locally.
>
> Rest of the patch looks okay to me.
>
> Thanks,
> Florian
>