DEVFS - Factor out recursive code into iterate_topology

看板DFBSD_commit作者時間16年前 (2009/08/09 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 66abefa5a42a0b63ca3bb1fbb1601c3955401681 Author: Alex Hornung <ahornung@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
文章代碼(AID): #1AVRrgCQ (DFBSD_commit)