about summary refs log tree commit diff
path: root/libio/fileno.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/fileno.c')
-rw-r--r--libio/fileno.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libio/fileno.c b/libio/fileno.c
index fbea4d4995..2dc67149c8 100644
--- a/libio/fileno.c
+++ b/libio/fileno.c
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 1993, 1995 Free Software Foundation
+Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
 
 This file is part of the GNU IO Library.  This library is free
 software; you can redistribute it and/or modify it under the
@@ -36,3 +36,12 @@ fileno (fp)
 
   return _IO_fileno (fp);
 }
+
+#ifdef _IO_MTSAFE_IO
+/* The fileno implementation for libio does not require locking because
+   it only accesses once a single variable and this is already atomic
+   (at least at thread level).  */
+
+weak_alias (fileno_unlocked, fileno)
+weak_alias (fileno_locked, fileno)
+#endif