aboutsummaryrefslogtreecommitdiff
path: root/stdio-common
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-05-06 16:10:28 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-05-10 23:35:44 -0300
commit1abc2fba5573205fd0669f82ffd37423a094207a (patch)
tree1c9da0bf4b723a14f043c2ca565219b7329ac0d0 /stdio-common
parente874d3d189f355fdf0e9ef9c0d0f493c6cf767be (diff)
downloadglibc-1abc2fba5573205fd0669f82ffd37423a094207a.tar
glibc-1abc2fba5573205fd0669f82ffd37423a094207a.tar.gz
glibc-1abc2fba5573205fd0669f82ffd37423a094207a.tar.bz2
glibc-1abc2fba5573205fd0669f82ffd37423a094207a.zip
linux: Move funlockfile/_IO_funlockfile into libc
The nptl version is used as default, since now with symbol always present the single-thread optimization is tricky. Hurd is not change, it is used it own lock scheme (which call _cthreads_funlockfile). Checked on x86_64-linux-gnu.
Diffstat (limited to 'stdio-common')
-rw-r--r--stdio-common/funlockfile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/stdio-common/funlockfile.c b/stdio-common/funlockfile.c
index 50f2f99948..961fa3d250 100644
--- a/stdio-common/funlockfile.c
+++ b/stdio-common/funlockfile.c
@@ -17,13 +17,13 @@
<https://www.gnu.org/licenses/>. */
#include <stdio.h>
-
-#undef _IO_funlockfile
+#include <stdio-lock.h>
+#include <sys/single_threaded.h>
void
__funlockfile (FILE *stream)
{
- /* Do nothing. Using this version does not do any locking. */
+ _IO_lock_unlock (*stream->_lock);
}
weak_alias (__funlockfile, _IO_funlockfile)
weak_alias (__funlockfile, funlockfile);