This is the mail archive of the glibc-bugs@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]

[Bug libc/6399] gettid() should have a wrapper


https://sourceware.org/bugzilla/show_bug.cgi?id=6399

--- Comment #34 from Gabriele Svelto <gabriele.svelto at gmail dot com> ---
(In reply to Nicholas Miell from comment #33)
> Your complaint as I understand it is "pthreads on Linux doesn't let me
> renice invidual threads, so instead of fixing that, gettid() should be
> exposed to userspace", which doesn't make much sense. :)

I was just giving a practical example of where we're using gettid() and why. Of
course in our case the best solution would be to have pthreads scheduling
primitives work properly with SCHED_OTHER but since that doesn't sound like a
realistic option in the short run not having to wrap the SYS_gettid syscall
ourselves would be already an improvement.

A brief search of SYS_gettid shows quite a few pieces of code wrapping it
already in their own gettid() so it might be time to provide this function
directly in libc:

http://code.google.com/query/#q=SYS_gettid

I found other, different uses in Gecko too: once the resulting value is used
with tgkill() and once as the 'nl_pid' field of a netlink socket address.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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