Add report on loading libthr dynamically
Approved by: hrs (mentor, implicit)
This commit is contained in:
parent
6c95c01a38
commit
1b22bc5abe
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=46553
1 changed files with 49 additions and 0 deletions
|
@ -1802,4 +1802,53 @@ WITHOUT_FORTH=y</pre>
|
|||
|
||||
<sponsor>The &os; Foundation</sponsor>
|
||||
</project>
|
||||
|
||||
<project cat='bin'>
|
||||
<title>libthr improvements</title>
|
||||
|
||||
<contact>
|
||||
<person>
|
||||
<name>
|
||||
<given>Konstantin</given>
|
||||
<common>Belousov</common>
|
||||
</name>
|
||||
<email>kib@FreeBSD.org</email>
|
||||
</person>
|
||||
</contact>
|
||||
|
||||
<body>
|
||||
<p>Historically, dynamic loading of the libthr.so thread
|
||||
library into a single-threaded process did not work in &os;.
|
||||
The longstanding recommendation to work-around the problem has
|
||||
been to always link the main binary with -lpthread if there was
|
||||
any chance of a need for threading functionality. This project
|
||||
converted libthr.so into a plugin for libc, which fixed the
|
||||
known issues preventing dynaic loading of libthr.so.</p>
|
||||
|
||||
<p>After the fix, linking the main binary with -lpthread is
|
||||
no longer requred, but is not harmful. I recommend thoroughly
|
||||
testing before removing libpthread from the libraries list in
|
||||
favor of dynamic loading, though. Note that potential problems
|
||||
will be subtle and their user-visible manifestations in the
|
||||
affected program even more surprising.</p>
|
||||
|
||||
<p>The following issues were present in the old version of
|
||||
libthr with respect to dynamic loading, but are fixed as
|
||||
a result of this work:</p>
|
||||
|
||||
<ul>
|
||||
<li>Invalid errno value seen after failed syscalls.</li>
|
||||
<li>Broken libthr internal locks and critical sections ignored
|
||||
by signals.</li>
|
||||
<li>Hung attempts to lock mutexes.</li>
|
||||
<li>Thread cancellation not occuring at guaranteed cancellation
|
||||
points.</li>
|
||||
</ul>
|
||||
|
||||
<p>The main change was committed as r276630 to HEAD, with many
|
||||
follow ups. It was merged to stable/10 in r277317.</p>
|
||||
</body>
|
||||
|
||||
<sponsor>The &os; Foundation</sponsor>
|
||||
</project>
|
||||
</report>
|
||||
|
|
Loading…
Reference in a new issue