DragonFly BSD
DragonFly kernel List (threaded) for 2005-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: is the dtom function declined?


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 23 Apr 2005 10:48:45 -0700 (PDT)

:>> 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@xxxxxxxxxxxxx>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]