git: kernel - RB_SCAN() requires a short-term spinlock

看板DFBSD_commit作者時間14年前 (2011/12/28 02:04), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 5f97768d56d8f4feadf9407630849bdd67cad2f1 Author: Matthew Dillon <dillon@apollo.backplane.com> Date: Mon Nov 28 22:03:23 2011 -0800 kernel - RB_SCAN() requires a short-term spinlock * RB_SCAN() links and unlinks an info structure. If called with a shared lock the linking and unlinking operations requires a very short-term spin lock to avoid clobbering each other. * Note that RB_REMOVE() scans the inprog list but this function can only be safely called with the RB tree held exclusively anyway, so there's no need to spinlock the info list. * Add kern/subr_rbtree.c glue functions for acquiring and releasing the spinlock, so sys/tree.h only needs to include sys/spinlock.h and not also sys/spinlock2.h Reported-by: sephe Summary of changes: sys/conf/files | 1 + sys/kern/{subr_shims.c => subr_rbtree.c} | 47 ++++++++++++++++-------------- sys/sys/tree.h | 26 +++++++++++++++- 3 files changed, 50 insertions(+), 24 deletions(-) copy sys/kern/{subr_shims.c => subr_rbtree.c} (74%) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5f97768d56d8f4feadf9407630849bdd67cad2f1 -- DragonFly BSD source repository
文章代碼(AID): #1E-WYkBI (DFBSD_commit)