Hello, this is a mini-HEADSUP mainly targeted at those working on the
 kernel source in FreeBSD-CURRENT.

In short, for the mbuf subsystem:

  M_WAIT is now deprecated and M_TRYWAIT should be used in its place.


Summary:

        This ONLY applies to allocations for the "mbuf subsystem" and NOT any
  allocations with malloc() or any other subsystems:
  
  The M_WAIT flag has been renamed to M_TRYWAIT. The commit message
  explains the reason for the rename. It basically has to do with the
  developer needing to check whether calls to m_get(), m_gethdr() (and
  their macro equivalents MGET and MGETHDR) as well as calls to the mbuf
  cluster allocation routines and macros return a NULL pointer. In other
  words, even calls with M_(TRYWAIT) may fail in allocating mbufs or mbuf
  clusters and therefore must be accompanied by a check for that failure.

  This has been the case for a while and the time spent blocking/waiting
  for resources is tunable with the kern.ipc.mbuf_wait sysctl. The flag
  name has been changed in an effort to "communicate the right message" to
  developers, especially those porting code from NetBSD and OpenBSD where
  M_WAIT means "block indefinetely if you can't get me anything."

  M_WAIT is now deprecated and M_TRYWAIT should be used in its place.

  Happy Holidays!

  Bosko Milekic
  [EMAIL PROTECTED]




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to