- 論壇徽章:
- 20
|
好的,感謝回復(fù)。
插入的時(shí)候特別強(qiáng)調(diào)了新的key必須在新的next之前可見,不知道是不是問題的關(guān)鍵?
73 We need to make sure a reader cannot read the new 'obj->obj_next' value
74 and previous value of 'obj->key'. Or else, an item could be deleted
75 from a chain, and inserted into another chain. If new chain was empty
76 before the move, 'next' pointer is NULL, and lockless reader can
77 not detect it missed following items in original chain.
hlist的版本,插入的時(shí)候還是有wmb的,但是遍歷的時(shí)候就沒有了(這意味著,允許讀者新的next和舊的key??) |
|