This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 3/4] Consolidate pread/pread64 implementations
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: libc-alpha at sourceware dot org, Adhemerval Zanella <adhemerval dot zanella at linaro dot com>
- Date: Thu, 7 Jan 2016 19:03:41 -0200
- Subject: Re: [PATCH 3/4] Consolidate pread/pread64 implementations
- Authentication-results: sourceware.org; auth=none
- References: <1452187108-6504-1-git-send-email-adhemerval dot zanella at linaro dot org> <1452187108-6504-4-git-send-email-adhemerval dot zanella at linaro dot org> <20160107195245 dot GB25548 at vapier dot lan> <568ECAEE dot 9020602 at linaro dot org> <20160107205418 dot GE25548 at vapier dot lan>
On 07-01-2016 18:54, Mike Frysinger wrote:
> On 07 Jan 2016 18:30, Adhemerval Zanella wrote:
>> On 07-01-2016 17:52, Mike Frysinger wrote:
>>> On 07 Jan 2016 15:18, Adhemerval Zanella wrote:
>>>> From: Adhemerval Zanella <adhemerval.zanella@linaro.com>
>>>>
>>>> This patch consolidates all the pread/pread64 implementation for Linux
>>>> in only one (sysdeps/unix/sysv/linux/pread.c). It also removes the
>>>> syscall from the auto-generation using assembly macros.
>>>>
>>>> For pread{64} offset argument placement the new SYSCALL_LL{64} macro
>>>> is used. For pread ports that do not define __NR_pread will use
>>>> __NR_pread64 and for pread64 ports that dot define __NR_pread64 will
>>>> use __NR_pread for the syscall.
>>>
>>> just to make sure i'm reading this correctly, in the past 64-bit ports
>>> would have a pread symbol and pread64 would be an alias to it. but with
>>> this patch, 64-bit ports now have two symbols w/identical code ?
>>
>> Indeed it is something I was thinking and I was not sure how to
>> fix it while not breaking the existing ABI. Maybe only building
>> the p{read,write}.c if not WORDSIZE64 is define and creating an
>> alias on p{read,write}64.c. What do you think?
>
> why do you need to delete the pread64.c & syscall.lists entries ?
> if you kept those, wouldn't things remain the same ?
>
> otherwise you'd have to keep the pread64.c and add a new pread.c
> that just includes the 32-bit pread.c but also adds the aliases.
> -mike
>
The idea is exactly to remove the auto-generation from syscalls.list
to simplify the cancellation syscall generation (to in the future
just get rid of the assembly hackery in sysdep-cancel.h).