This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/6399] gettid() should have a wrapper
- From: "gabriele.svelto at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 11 Jan 2014 10:07:40 +0000
- Subject: [Bug libc/6399] gettid() should have a wrapper
- Auto-submitted: auto-generated
- References: <bug-6399-131 at http dot sourceware dot org/bugzilla/>
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.