Date: Thu, 21 Dec 2000 16:58:20 -0500 (EST) From: Bosko Milekic <bmilekic@technokratis.com> To: freebsd-current@freebsd.org Subject: mini HEADS-UP: M_WAIT renamed to M_TRYWAIT Message-ID: <Pine.BSF.4.21.0012211651330.20908-100000@jehovah.technokratis.com>
next in thread | raw e-mail | index | archive | help
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 bmilekic@technokratis.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0012211651330.20908-100000>