kernel: Remove explicit dependencies on <sys/malloc.h> in headers. All except <net/if_var.h> for now, it needs decoupling in drm first. * Include <sys/malloc.h> in foo.c if they have kmalloc()/kfr
kernel: Remove explicit dependencies on <sys/malloc.h> in headers. All except <net/if_var.h> for now, it needs decoupling in drm first. * Include <sys/malloc.h> in foo.c if they have kmalloc()/kfree() calls. * Consistently check if MALLOC_DECLARE was declared before. * <sys/mountctl.h>: include <sys/thread.h> for _KERNEL_STRUCTURES too since the "struct journal" embeds "struct thread". * <sys/tty.h>: Only two kernel sources makes use of M_TTYS. * <sys/socketvar2.h>: Make it kernel only header.
show more ...
kernel: Move us to using M_NOWAIT and M_WAITOK for mbuf functions.The main reason is that our having to use the MB_WAIT and MB_DONTWAITflags was a recurring issue when porting drivers from FreeBSD
kernel: Move us to using M_NOWAIT and M_WAITOK for mbuf functions.The main reason is that our having to use the MB_WAIT and MB_DONTWAITflags was a recurring issue when porting drivers from FreeBSD becauseit tended to get forgotten and the code would compile anyway with thewrong constants. And since MB_WAIT and MB_DONTWAIT ended up as ocflagsfor an objcache_get() or objcache_reclaimlist call (which use M_WAITOKand M_NOWAIT), it was just one big converting back and forth with somesanitization in between.This commit allows M_* again for the mbuf functions and keeps thesanitizing as it was before: when M_WAITOK is among the passed flags,objcache functions will be called with M_WAITOK and when it is absent,they will be called with M_NOWAIT. All other flags are scrubbed by theMB_OCFLAG() macro which does the same as the former MBTOM().Approved-by: dillon
Remove a bunch of unnecessary semicolons.
kernel: Add three missing ')', two of them in (yet) unused code.
kernel: Use M_ZERO instead of bzero()ing.
kernel: Remove NULL checks after kmalloc() with M_WAITOK.
netgraph7: convert lockmgr locks into mutexes.
kernel/netgraph7: Replace usage of MALLOC/FREE with kmalloc/kfree here too.Requested-by: Nuno Antunes
Netgraph port from FreeBSD - initial porting work* Use relative #include's as appropriate so the code doesn't dig into the original netgraph/ directory.* Move FBSDID's and add DragonFly ids.*
Netgraph port from FreeBSD - initial porting work* Use relative #include's as appropriate so the code doesn't dig into the original netgraph/ directory.* Move FBSDID's and add DragonFly ids.* Fix improper uses of M_NOWAIT.* Fix uses of M_NOWAIT which should be MB_DONTWAIT and vise-versa (also forward to Julian).* Add a dragonfly.h compatibility header.* NOTE: m_tag_alloc() in DFly takes MB_ flags.
Vendor import of netgraph from FreeBSD-current 20080626