This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: CALL_THREAD_FCT usage
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 4 Apr 2017 10:03:11 -0300
- Subject: Re: CALL_THREAD_FCT usage
- Authentication-results: sourceware.org; auth=none
- References: <a32a8a59-b1d7-3f05-4248-56a9ddbe8e1c@linaro.org> <98dec22f-e1a5-5113-1ca4-f412bac87f1e@redhat.com>
On 04/04/2017 08:59, Florian Weimer wrote:
> On 03/31/2017 09:15 PM, Adhemerval Zanella wrote:
>> While implementing the C11 thread support I noted x86 is the only architecture
>> that actually defines CALL_THREAD_FCT. The 32 bits version seems to define it
>> to explicit align the stack to 16 bytes before call the user provided symbol,
>> while 64 and x32 seems to just make a function call. Do we still really need
>> such macro for x86?
>
> I don't think so. Stack alignment is handled in the clone implementation itself. The inline assembly seems to lack a couple of clobbers, so I'd suggest to get rid of it.
>
> I don't think x32 requires CALL_THREAD_FCT, either.
That was my understanding as well, I am checking to see if someone is aware of
something subtle about it. I will prepare a patch to remove it.
>
> Thanks,
> Florian