From owner-freebsd-current Fri May 31 0: 4:15 2002 Delivered-To: freebsd-current@freebsd.org Received: from tesla.distributel.net (nat.MTL.distributel.NET [66.38.181.24]) by hub.freebsd.org (Postfix) with ESMTP id AB18537B40D for ; Fri, 31 May 2002 00:03:58 -0700 (PDT) Received: (from bmilekic@localhost) by tesla.distributel.net (8.11.6/8.11.6) id g4TDF1r61130; Wed, 29 May 2002 09:15:01 -0400 (EDT) (envelope-from bmilekic@unixdaemons.com) Date: Wed, 29 May 2002 09:15:01 -0400 From: Bosko Milekic To: Peter Wemm Cc: Terry Lambert , Richard Wenninger , current@FreeBSD.ORG Subject: Re: UMA lock Message-ID: <20020529091501.C61073@unixdaemons.com> References: <3CF475E3.8925781A@mindspring.com> <20020529072020.89F16380A@overcee.wemm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020529072020.89F16380A@overcee.wemm.org>; from peter@wemm.org on Wed, May 29, 2002 at 12:20:20AM -0700 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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