This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add finit_module syscall for Linux


On Fri, Jan 25, 2013 at 2:50 PM, Michael Kerrisk (man-pages)
<mtk.manpages@gmail.com> wrote:
> On Fri, Jan 25, 2013 at 8:14 PM, Kees Cook <keescook@chromium.org> wrote:
>> On Fri, Jan 25, 2013 at 9:31 AM, KOSAKI Motohiro
>> <kosaki.motohiro@gmail.com> wrote:
>>>>     gettid(2)
>>>
>>> Very frequently uses. because linux /proc uses tid. pthrad_self()
>>> don't help us when facing libc/kernel combination issue.
>>> I have no seen any issue of exporting.
>>
>> Yeah, I've needed gettid() in multiple situations before. I think
>> having this available in glibc would be great.
>
> http://sourceware.org/bugzilla/show_bug.cgi?id=6399 has been around
> for a long time now, but didn't get much traction with Ulrich...

I completely agree with you. If we can roll back time, we should fix
pthread_self()
to return tid because current implementation is POSIX invalid (*).
however it's impossible and making new interface for getting tid is
best practical solution.

(*) pthread_kill() must return -ESRCH if target thread was already
exited. that imply
    pthread_self() returns pid like id number, not bare C pointer.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]