This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/21119] New: Unify the pthread_mutex_t definitions
- From: "hyc at symas dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 09 Feb 2017 14:10:20 +0000
- Subject: [Bug nptl/21119] New: Unify the pthread_mutex_t definitions
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=21119
Bug ID: 21119
Summary: Unify the pthread_mutex_t definitions
Product: glibc
Version: 2.23
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: nptl
Assignee: unassigned at sourceware dot org
Reporter: hyc at symas dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
Currently the size of a pthread_mutex_t structure can be one of 3 different
sizes, depending on the CPU architecture and ABI. E.g., from
/usr/include/pthreadtypes.h:
#ifdef __x86_64__
# if __WORDSIZE == 64
# define __SIZEOF_PTHREAD_MUTEX_T 40
# else
# define __SIZEOF_PTHREAD_MUTEX_T 32
# endif
#else
# define __SIZEOF_PTHREAD_MUTEX_T 24
#endif
This limits the usefulness of process-shared mutexes, as they cannot safely be
used by both 32bit and 64bit processes at the same time.
It Would Be Nice if a cross-arch-compatible definition could be made. Since the
guts are all behind a futex syscall anyway this shouldn't be a huge problem,
should it?
Presumably this is also an issue for process-shared rwlocks.
--
You are receiving this mail because:
You are on the CC list for the bug.