about summary refs log tree commit diff
path: root/libio/iosetbuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/iosetbuffer.c')
-rw-r--r--libio/iosetbuffer.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libio/iosetbuffer.c b/libio/iosetbuffer.c
index 2497304076..d43d0ebca8 100644
--- a/libio/iosetbuffer.c
+++ b/libio/iosetbuffer.c
@@ -35,8 +35,7 @@ _IO_setbuffer (fp, buf, size)
      _IO_size_t size;
 {
   CHECK_FILE (fp, );
-  _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, fp);
-  _IO_flockfile (fp);
+  _IO_acquire_lock (fp);
   fp->_flags &= ~_IO_LINE_BUF;
   if (!buf)
     size = 0;
@@ -44,8 +43,7 @@ _IO_setbuffer (fp, buf, size)
   if (_IO_vtable_offset (fp) == 0 && fp->_mode == 0 && _IO_CHECK_WIDE (fp))
     /* We also have to set the buffer using the wide char function.  */
     (void) _IO_WSETBUF (fp, buf, size);
-  _IO_funlockfile (fp);
-  _IO_cleanup_region_end (0);
+  _IO_release_lock (fp);
 }
 INTDEF(_IO_setbuffer)