[PATCH] Cygwin: FIFO: implement clear_readahead

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Mar 28 09:16:00 GMT 2019


On Mar 27 21:29, Ken Brown wrote:
> 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.
> ---
>  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 3398cc625..21fec9e38 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 *);
> -- 
> 2.17.0

Pushed.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20190328/d90ea58d/attachment.sig>


More information about the Cygwin-patches mailing list