Re: await & asleep

From: M. Warner Losh (imp_at_bsdimp.com)
Date: 07/28/05

  • Next message: Uwe Doering: "Re: Problem with pic16l_setled"
    Date: Wed, 27 Jul 2005 22:10:09 -0600 (MDT)
    To: scottl@samsco.org
    
    

    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
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Uwe Doering: "Re: Problem with pic16l_setled"

    Relevant Pages

    • Re: NSL Sign?
      ... >> available to the public it's meaning was VERY specific. ... >> from the left WITH EQUAL PRIORITY. ... It was then that I found the lack of publication, ... Mark Foster, Brighton, Sussex, UK ...
      (uk.rec.driving)
    • Re: klibc
      ... so I can help others through the transition. ... I've been meaning to write up some proper documentation, but obviously my #1 priority has been to fix problems as they crop up. ...
      (Linux-Kernel)
    • Re: NSL Sign?
      ... > Presumably without the capitals? ... I believed that the priority was equal since that was ... >> sign and the changed meaning. ... Mark Foster, Brighton, Sussex, UK ...
      (uk.rec.driving)
    • Re: Prioritize
      ... Instead of a definition, I understand the term to mean the action of assesment of order of importance, according to certain criterion, or ... has been given a higher or lower priority? ... The "given a lower priority" meaning is vaguely possible, ... speaking English, in an English-speaking company. ...
      (alt.usage.english)
    • Re: Road Traffic Act Offence
      ... > right of way" relates to the right to pass and repass, ... > way" relates to the priority I mentioned, ... correct usage, and as such, the meaning I would expect is intended in ... If the meaning was that a particular party had priority, ...
      (uk.rec.cycling)