This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Linux: Add the tgkill function
- From: Florian Weimer <fweimer at redhat dot com>
- To: Carlos O'Donell <codonell at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 14 May 2019 21:34:59 +0200
- Subject: Re: [PATCH] Linux: Add the tgkill function
- References: <87v9zomhxp.fsf@oldenburg2.str.redhat.com> <c3cc7940-94a6-cf53-0f1f-584c7df89a96@redhat.com>
* Carlos O'Donell:
>> diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
>> index 25424e1399..75a2f23a17 100644
>> --- a/sysdeps/unix/sysv/linux/syscalls.list
>> +++ b/sysdeps/unix/sysv/linux/syscalls.list
>> @@ -111,3 +111,4 @@ memfd_create EXTRA memfd_create i:si memfd_create
>> pkey_alloc EXTRA pkey_alloc i:ii pkey_alloc
>> pkey_free EXTRA pkey_free i:i pkey_free
>> gettid EXTRA gettid Ei: __gettid gettid
>> +tgkill EXTRA tgkill i:ii __tgkill tgkill
>
> The signature for tgkill should be i:iii (missing an 'i').
Oops. This probably worked on x86-64 only. 8-/
> I'll be honest and admit I never paid attention to the semantic
> meaning of EXTRA.
>
> Why does tgkill have caller EXTRA?
>
> As far as I know 'EXTRA' triggers the object to be added to
> unix-extra-syscalls, whose only effect is to put the syscall into
> sysdep_routines for subdir misc, and beyond that it isn't clear why
> it's needed at all (even for all the other syscalls). What does
> sysdep_routines really provide here?
Oh. There's no stub for tgkill, which is why I think the system call
has to be to routines somewhere, and EXTRA does that.
Are you satisfied with this explanation?
Thanks,
Florian