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: "carlos at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 08 Apr 2016 09:01:26 +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 #47 from Carlos O'Donell <carlos at redhat dot com> ---
Note that C++ is considering coroutines, and if implemented in C they would
represent a case where we could conceptually have multiple execution contexts
within the same OS thread. Exposing the OS tid would further complicate
programming using these execution contexts since the tid's would be the same.
If we stay with pthread_t, we can at least under the hood have a pthread_t per
execution context that might be used to allow some threading operations to be
shared between the various execution abstractions. I understand this objection
is not a full formed idea, but I wanted to put my recent thoughts down on this
issue.
If anything needs fixing it's the interfaces that take a tid. We need
SIGEV_PTHREAD_ID, we need new functions to set CPU affinity for threads (Rich
mentions he is looking at a fix), and fcntl options for threads.
--
You are receiving this mail because:
You are on the CC list for the bug.