This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] bfd_cache_close_all
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Jerome Guitton <guitton at act-europe dot fr>
- Cc: binutils at sources dot redhat dot com, gdb-patches at sources dot redhat dot com
- Date: Thu, 17 Jun 2004 11:52:41 +0930
- Subject: Re: [RFA] bfd_cache_close_all
- References: <20040616171748.GA8782@act-europe.fr>
On Wed, Jun 16, 2004 at 07:17:48PM +0200, Jerome Guitton wrote:
> The idea would be to have a function bfd_cache_close_all that would
> clear the file descriptor cache.
>
> OK to apply?
> + if (!bfd_last_cache)
> + return TRUE;
> +
> + for (kill = bfd_last_cache->lru_prev;
> + open_files;
> + kill = kill->lru_prev)
> + {
> + ret = ret && bfd_cache_close (kill);
> + }
No need to close oldest first. OK with the following change to simplify
the code.
while (bfd_last_cache != NULL)
ret &= bfd_cache_close (bfd_last_cache);
--
Alan Modra
IBM OzLabs - Linux Technology Centre