summary refs log tree commit diff
path: root/libio/genops.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-06-07 22:50:32 +0000
committerUlrich Drepper <drepper@redhat.com>2000-06-07 22:50:32 +0000
commit3fc9ca4e389ff1606a4883d50401eaa1a777a07e (patch)
tree70a6a54e2bf0415e3622475f1a0613a7cfef3b40 /libio/genops.c
parentce177a8416e21b074d1d3382d81939897ff86fa8 (diff)
downloadglibc-3fc9ca4e389ff1606a4883d50401eaa1a777a07e.tar.gz
glibc-3fc9ca4e389ff1606a4883d50401eaa1a777a07e.tar.xz
glibc-3fc9ca4e389ff1606a4883d50401eaa1a777a07e.zip
Update.
2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>

	Lock for stdio stream list becomes global, for use in LinuxThreads.

	* libio/genops.c (_IO_iter_begin, _IO_iter_end,
	_IO_iter_next, _IO_iter_file, _IO_list_lock, _IO_list_unlock,
	_IO_list_resetlock): New interface for iterating global list of
	streams without accessing the _IO_list_all global variable,
	and for manipulating the lock which protects this list.
	* libio/libioP.h: Likewise.
	* libio/Version: Add entries for the new functions.

	* libio/libioP.h (_IO_ITER): New typedef, just an alias for
	pointer to _IO_FILE.
Diffstat (limited to 'libio/genops.c')
-rw-r--r--libio/genops.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/libio/genops.c b/libio/genops.c
index c59518143f..fb4f08bd3f 100644
--- a/libio/genops.c
+++ b/libio/genops.c
@@ -1028,6 +1028,50 @@ _IO_default_imbue (fp, locale)
 {
 }
 
+_IO_ITER
+_IO_iter_begin()
+{
+  return _IO_list_all;
+}
+
+_IO_ITER
+_IO_iter_end()
+{
+	return NULL;
+}
+
+_IO_ITER
+_IO_iter_next(iter)
+    _IO_ITER iter;
+{
+  return iter->_chain;
+}
+
+_IO_FILE *
+_IO_iter_file(iter)
+    _IO_ITER iter;
+{
+  return iter;
+}
+
+void
+_IO_list_lock()
+{
+  _IO_lock_lock (list_all_lock);
+}
+
+void
+_IO_list_unlock()
+{
+    _IO_lock_unlock (list_all_lock);
+}
+
+void
+_IO_list_resetlock()
+{
+  _IO_lock_init (list_all_lock);
+}
+
 
 #ifdef TODO
 #if defined(linux)