DEVFS - Factor out recursive code into iterate_topology
Alex Hornung
alexh at crater.dragonflybsd.org
Sat Aug 8 10:01:56 PDT 2009
commit 66abefa5a42a0b63ca3bb1fbb1601c3955401681
Author: Alex Hornung <ahornung at gmail.com>
Date: Sat Aug 8 17:42:02 2009 +0100
DEVFS - Factor out recursive code into iterate_topology
* Factor out the recursive code which scans through all nodes in
the topology into a function, devfs_iterate_topology, which takes
a callback as argument, which is called for every node.
* Create new callback functions for all functions that were recursive
before, containing the code that was executed for each node.
* Change all callers of recursive functions to call
devfs_iterate_topology with the respective callback function
instead of having their own recursive functions.
Summary of changes:
sys/vfs/devfs/devfs.h | 8 ++-
sys/vfs/devfs/devfs_core.c | 201 +++++++++++++++---------------------------
sys/vfs/devfs/devfs_rules.c | 14 ++--
sys/vfs/devfs/devfs_rules.h | 6 +-
4 files changed, 88 insertions(+), 141 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/66abefa5a42a0b63ca3bb1fbb1601c3955401681
--
DragonFly BSD source repository
More information about the Commits
mailing list