Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys
dyoung%pobox.com@localhost said:
> Please put device_foreach_child() back, though, I am using that.
Just for curiosity, what are you doing?
I'm thinking about how to get the device list traversals
protected -- eg the child list in drvctl can be called
by everyone, and a device removal could interfere with it,
leading to a crash.
My ideas spin around an iterator which must be allocated
and freed, and some counter which tracks the number of
active iterators. Device removals would be deferred until
all iterators are freed. That would be more flexible than
a callback, and easier to use. What do you think?
> BTW, I believe that you can safely walk the list backwards.
That should work, but in general use this would lead to
counter-intuitive results. I'd prefer some kind of locking.
best regards
Matthias
-------------------------------------------------------------------
-------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Dr. Sebastian M. Schmidt
-------------------------------------------------------------------
-------------------------------------------------------------------
Home |
Main Index |
Thread Index |
Old Index