DragonFly kernel List (threaded) for 2007-08
DragonFly BSD
DragonFly kernel List (threaded) for 2007-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: sleep/wakeup sequence using tsleep_interlock


From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Sun, 19 Aug 2007 10:06:08 +0200

Aggelos Economopoulos wrote:
* (enter critical section)
* (acquire upper level lock)
* tsleep_interlock(blah)
* (release upper level lock)
* tsleep(blah, ...)
* (exit critical section)
It is not obvious to me why the first two operations can't be reversed (i.e. first acquire lock, then enter critical section). Can they?

Yes, they can :)


cheers
 simon

--
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]