Re: Add a mountlist iterator (round 2)

2017-04-10 Thread J. Hannken-Illjes
> On 9. Apr 2017, at 19:16, Taylor R Campbell > wrote: > >> Date: Sun, 9 Apr 2017 18:47:25 +0200 >> From: "J. Hannken-Illjes" >> >>> On 6. Apr 2017, at 11:44, J. Hannken-Illjes wrote: >>> Good hint.

Re: Add a mountlist iterator (round 2)

2017-04-09 Thread Taylor R Campbell
> Date: Sun, 9 Apr 2017 18:47:25 +0200 > From: "J. Hannken-Illjes" > > > On 6. Apr 2017, at 11:44, J. Hannken-Illjes wrote: > > Good hint. Prepared a partial implementation of > > > > int > > mountlist_iterate(int (*cb)(struct mount *, void

Re: Add a mountlist iterator (round 2)

2017-04-09 Thread J. Hannken-Illjes
> On 6. Apr 2017, at 11:44, J. Hannken-Illjes wrote: > >> >> On 5. Apr 2017, at 05:14, Chuck Silvers wrote: >> >> have you considered a callback-based interface where the loop >> is inside the iteration API rather than in the caller? >> the

Re: Add a mountlist iterator (round 2)

2017-04-06 Thread J. Hannken-Illjes
> On 5. Apr 2017, at 05:14, Chuck Silvers wrote: > > have you considered a callback-based interface where the loop > is inside the iteration API rather than in the caller? > the vfs_busy/unbusy could also be hidden in the iteration API > so that the callback would not need need

Re: Add a mountlist iterator (round 2)

2017-04-05 Thread Chuck Silvers
have you considered a callback-based interface where the loop is inside the iteration API rather than in the caller? the vfs_busy/unbusy could also be hidden in the iteration API so that the callback would not need need to worry about it at all. I looked at how the iteration stuff is used in your

Re: Add a mountlist iterator (round 2)

2017-04-04 Thread J. Hannken-Illjes
Time to start a second round. This time the iterator only, vfs_busy() and friends deferred to a new thread once the iterator is done. Changes from the previous proposal: - Removed the "flags" argument from mountlist_iterator_next(), will add mountlist_iterator_trynext() and vfs_trybusy() when