Avoid linking pulling libpthread

Bug #1556410 reported by Mattia Rizzolo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libeatmydata
New
Undecided
Unassigned
libeatmydata (Debian)
Fix Released
Unknown

Bug Description

from a downstream Debian bug: https://bugs.debian.org/816144

libeatmydata is linked against libpthread. This thus pulls libpthread in all processes run under eatmydata. It happens that having
libpthread in a process makes pthread_mutex_lock() and all such basic performance-sensitive operations much heavier (since they then have to deal with potential multithreading). The attached patch avoids that by using a weak reference to pthread_testcancel, so that pthread_testcancel is called only if the program itself pulls libpthread.

I'm going to open a merge request for this.

Related branches

Changed in libeatmydata (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.