diff options
Diffstat (limited to 'libio/iofwrite.c')
-rw-r--r-- | libio/iofwrite.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libio/iofwrite.c b/libio/iofwrite.c index 6f0d273574..1f4331cc83 100644 --- a/libio/iofwrite.c +++ b/libio/iofwrite.c @@ -40,12 +40,10 @@ _IO_fwrite (buf, size, count, fp) CHECK_FILE (fp, 0); if (request == 0) return 0; - _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); - _IO_flockfile (fp); + _IO_acquire_lock (fp); if (_IO_vtable_offset (fp) != 0 || _IO_fwide (fp, -1) == -1) written = _IO_sputn (fp, (const char *) buf, request); - _IO_funlockfile (fp); - _IO_cleanup_region_end (0); + _IO_release_lock (fp); if (written == request) return count; else |