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 - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> "All of this is for nothing if we don't go to the stars" - JMS/B5

-- 
Bosko Milekic
[EMAIL PROTECTED]
[EMAIL PROTECTED]


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

Reply via email to