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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user