This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Dummy pthread functions in libc considered harmful
- From: Rich Felker <dalias at libc dot org>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: Samuel Thibault <samuel dot thibault at ens-lyon dot org>, libc-alpha at sourceware dot org
- Date: Tue, 25 Aug 2015 03:19:00 -0400
- Subject: Re: Dummy pthread functions in libc considered harmful
- Authentication-results: sourceware.org; auth=none
- References: <mvmr3ms4sbj dot fsf at hawking dot suse dot de> <20150824153816 dot GC3210 at type dot bordeaux dot inria dot fr> <20150824162250 dot GD32742 at brightrain dot aerifal dot cx> <20150824162641 dot GH3210 at type dot bordeaux dot inria dot fr> <mvmbndv4zeh dot fsf at hawking dot suse dot de>
On Tue, Aug 25, 2015 at 09:09:58AM +0200, Andreas Schwab wrote:
> Samuel Thibault <samuel.thibault@ens-lyon.org> writes:
>
> > It's usually not programs which call pthread_mutex, but libraries which
> > want to be thread-safe without actually bringing the libpthread
> > dependencye.
>
> Does the reason for avoiding the dependency still exist? Surely the
> overhead of libpthread has been greatly reduced since the days of
> linuxthreads.
In short, no, but it's hard to get people to give up bad practices. So
glibc needs to minimize the impact of these bad choices.
Really, libpthread.so should just be an empty library file for
compatibility and all of the actual implementations should be in
libc.so, but making that happen would be a lot of work.
Rich