Date: Thu, 19 Aug 2004 19:51:51 +0000 (UTC) From: Poul-Henning Kamp <phk@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/sys bio.h src/sys/kern subr_disk.c Message-ID: <200408191951.i7JJpp2f046979@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
phk 2004-08-19 19:51:51 UTC FreeBSD src repository Modified files: sys/sys bio.h sys/kern subr_disk.c Log: Add bioq_takefirst(). If the bioq is empty, NULL is returned. Otherwise the front element is removed and returned. This can simplify locking in many drivers from: lock() bp = bioq_first(bq); if (bp == NULL) { unlock() return } bioq_remove(bp, bq) unlock to: lock() bp = bioq_takefirst(bq); unlock() if (bp == NULL) return; Revision Changes Path 1.81 +11 -6 src/sys/kern/subr_disk.c 1.140 +2 -0 src/sys/sys/bio.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408191951.i7JJpp2f046979>