Re: is the dtom function declined?

看板DFBSD_kernel作者時間21年前 (2005/04/24 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/4 (看更多)
:>> When I read the source code about mbuf, I noticed :>> mtod is kept, but no dtom. Is the dtom function declined? :>> :>> Paul :> :> The 'dtom' macro is deprecated, last time I checked. :> :> -Hiten :> : :Which macro/function can I used to replace "dtom"? : :best regards It doesn't exist any more. dtom() used to convert a data pointer to an mbuf pointer. This was possible only as an artifact of the original mbuf allocator implementation. The macro was massively misused all over. When I rewrote that mbuf API last year I got rid of it. There is in fact, *NO* easy way to convert a data pointer to its related mbuf (nor would you want to). Instead, all related code simply tracks the actual mbuf pointer (which is what it should have done in the first place). -Matt Matthew Dillon <dillon@backplane.com>
文章代碼(AID): #12Qes900 (DFBSD_kernel)
文章代碼(AID): #12Qes900 (DFBSD_kernel)