Date: Wed, 27 Jul 2005 22:10:09 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: scottl@samsco.org Cc: deischen@freebsd.org, NKoch@demig.de, freebsd-hackers@freebsd.org Subject: Re: await & asleep Message-ID: <20050727.221009.70219624.imp@bsdimp.com> In-Reply-To: <42E7BD9F.6060401@samsco.org> References: <Pine.GSO.4.43.0507271249120.3804-100000@sea.ntplx.net> <42E7BD9F.6060401@samsco.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <42E7BD9F.6060401@samsco.org> Scott Long <scottl@samsco.org> writes: : > and the priority argument of tsleep() doesn't have any meaning : > any longer, right? : > : : I thought it did, but John can give the definitive answer. Priority is still useful. It is the same priority that msleep uses. tsleep is completely equivalent to msleep with a null mtx parameter. The priority field is indeed used: /* * Adjust this thread's priority. */ mtx_lock_spin(&sched_lock); sched_prio(td, priority & PRIMASK); mtx_unlock_spin(&sched_lock); msleep is a different primitive that cv_wait and friends. cv_wait enforces good mutex practices and generally should be used... Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050727.221009.70219624.imp>