Bug 141181
Summary: | pthread_self() does not work correctly | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | jozef CERNAK <jcernak> |
Component: | glibc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED NOTABUG | QA Contact: | Brian Brock <bbrock> |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | 2 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-11-29 21:28:21 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
jozef CERNAK
2004-11-29 19:52:55 UTC
Nothing is wrong. pthread_self () returns a pthread_t value. It is a handle for the current thread and it's meaning is completely implementation dependent. For a program, it is just a magic cookie that can be get from pthread_self () or pthread__create, compared with pthread_equal, passed to pthread_join/pthread_detach/pthread_cancel and a couple of other functions. If your program expects it to be small integer, it makes bad assumption. For LinuxThreads it was a small integer, for NPTL it is a pointer, but that's just implementation detail. |