lockmgr_sleep() (was Re: ssleep() (was Re: mention msleep() in porting_drivers.txt))

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Sun Feb 10 02:50:53 PST 2008


Aggelos Economopoulos wrote:
diff -u -p -r1.88 kern_synch.c
--- sys/kern/kern_synch.c
+++ sys/kern/kern_synch.c
@@ -587,6 +587,29 @@ tsleep_interlock(void *ident)
 }
 
 /*
+ * Atomically drop a lockmgr lock and go to sleep. The lock is reacquired
+ * before returning from this function. Passes on the value returned by
+ * tsleep().
+ */
+int
+lock_sleep(void *ident, int flags, const char *wmesg, int timo,
+	   struct lock *lk)
I like it, but I'd put lock_sleep in kern_lock.c and wouldn't make 
lockstatus_owned public.

+10, should go in now.  However then we'd ship a release with a lot of 
deprecation warnings.  Maybe we should follow up with a msleep->spin_sleep 
commit.

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   / \





More information about the Submit mailing list