Date: Wed, 29 May 2002 09:15:01 -0400 From: Bosko Milekic <bmilekic@unixdaemons.com> To: Peter Wemm <peter@wemm.org> Cc: Terry Lambert <tlambert2@mindspring.com>, Richard Wenninger <richard@richardw.net>, current@FreeBSD.ORG Subject: Re: UMA lock Message-ID: <20020529091501.C61073@unixdaemons.com> In-Reply-To: <20020529072020.89F16380A@overcee.wemm.org>; from peter@wemm.org on Wed, May 29, 2002 at 12:20:20AM -0700 References: <3CF475E3.8925781A@mindspring.com> <20020529072020.89F16380A@overcee.wemm.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 29, 2002 at 12:20:20AM -0700, Peter Wemm wrote: > M_WAIT for mbufs (not malloc) was an alias for M_WAITOK, and M_DONTWAIT > (also just for mbufs) was an alias for M_NOWAIT. > > You call things and either permit them to tsleep() or you do not. > > M_NOWAIT to the mbuf m_get*, malloc*, contigmalloc*, uma_* etc means > "you must not tsleep!". M_WAITOK conversely means that tsleep should be > called as needed. Things like malloc still can return NULL even with M_WAITOK > for non-recoverable scenarios. Exactly, with one exception: they are no longer aliases. I had renamed (after some discussion) M_WAIT and M_DONTWAIT in the mbuf code to M_TRYWAIT and M_DONTWAIT, respectively, to avoid confusion and avoid mixing the flags with the malloc() flags. > Cheers, > -Peter > -- > Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com > "All of this is for nothing if we don't go to the stars" - JMS/B5 -- Bosko Milekic bmilekic@unixdaemons.com bmilekic@FreeBSD.org 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?20020529091501.C61073>