public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: FIFO: implement clear_readahead
@ 2019-03-28 9:13 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2019-03-28 9:13 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=e0fd15c91b206ff788148b8dd2a37a80c8cad175
commit e0fd15c91b206ff788148b8dd2a37a80c8cad175
Author: Ken Brown <kbrown@cornell.edu>
Date: Wed Mar 27 21:29:21 2019 +0000
Cygwin: FIFO: implement clear_readahead
Make fhandler_base::clear_readahead virtual, and implement
fhandler_fifo::clear_readahead. This is called by
dtable::fixup_after_exec; it clears the readahead in each client.
Diff:
---
winsup/cygwin/fhandler.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 3398cc6..21fec9e 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -444,7 +444,7 @@ public:
return dev ().native ();
}
virtual bg_check_types bg_check (int, bool = false) {return bg_ok;}
- void clear_readahead ()
+ virtual void clear_readahead ()
{
raixput = raixget = ralen = rabuflen = 0;
rabuf = NULL;
@@ -1302,6 +1302,12 @@ public:
bool arm (HANDLE h);
void fixup_after_fork (HANDLE);
int __reg2 fstatvfs (struct statvfs *buf);
+ void clear_readahead ()
+ {
+ fhandler_base::clear_readahead ();
+ for (int i = 0; i < nclients; i++)
+ client[i].fh->clear_readahead ();
+ }
select_record *select_read (select_stuff *);
select_record *select_write (select_stuff *);
select_record *select_except (select_stuff *);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-03-28 9:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-28 9:13 [newlib-cygwin] Cygwin: FIFO: implement clear_readahead Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).