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 #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.

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