1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

linux: Move flockfile/_IO_flockfile 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_flockfile).

Checked on x86_64-linux-gnu.
This commit is contained in:
Adhemerval Zanella
2021-05-06 15:49:45 -03:00
parent 30685597a4
commit 7b4e7ca9db
32 changed files with 3 additions and 94 deletions

View File

@@ -17,13 +17,13 @@
<https://www.gnu.org/licenses/>. */
#include <stdio.h>
#undef _IO_flockfile
#include <stdio-lock.h>
void
__flockfile (FILE *stream)
{
/* Do nothing. Using this version does not do any locking. */
stream->_flags2 |= _IO_FLAGS2_NEED_LOCK;
_IO_lock_lock (*stream->_lock);
}
weak_alias (__flockfile, flockfile);
weak_alias (__flockfile, _IO_flockfile)