m_freem()



m_freem() would be a perfect candidate for an inline function.
(or even macro).
in the case where m is null, no function call would even be made...
The whole function is only 2 lines, and it gets called once for every packet :-)


BUT it's a part of the ABI to have it as a function for RELENG_7 and earlier...
1/ can we change it in -current/RELENG_8
2/ if not is there such a thing as an inline that has a function version too?

(I have vague memories of that being possible...)

_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Is there stack associated when a executing an inline function?
    ... A lot of the features of an inline function can be emulated in a macro ... global variable called xyzzy: ...
    (comp.lang.c)
  • Re: files "." and ".." from readdir()
    ... What is your justification for others to use an inline function over a ... |> | expanded in 'surprising places' and macro errors are difficult to ... ie it originally was a programming practice ... compiler and human both see the same source code and because no ...
    (comp.unix.programmer)
  • Re: off-topic: open challenge to Christian Lynbeck
    ... It's worthwhile to know the specifics of your ... >> out ftruncate could be fast inside a macro, ... > made it an inline function, you will find that ftruncate will still be ...
    (comp.lang.lisp)
  • 2.6.15-rc5-mm2 cant boot on ia64 due to changing on_each_cpu().
    ... The line 228 and 251 are calling on_each_cpu. ... An inline function in smp.h introduces messy ordering requirements on ... thread_info by way of using an inline function instead of macro. ...
    (Linux-Kernel)
  • Re: Alternatives to #define?
    ... > Well, that's technically correct, but you're losing ... > just make a slight correction to the macro definition: ... no benefit over an inline function, ... for giving programmers an option that will be ...
    (comp.lang.cpp)