summaryrefslogtreecommitdiffstats
path: root/sys/sys/conf.h
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-03-27 11:34:27 +0000
committerkib <kib@FreeBSD.org>2013-03-27 11:34:27 +0000
commit448e7c12908c8a8680ec5f93934de43b8ad1a06f (patch)
tree036654e19fbde1423bfd8d644566101fc38a8e7b /sys/sys/conf.h
parentdf3795022f641dd4da863c0f0ff258a789720c23 (diff)
downloadFreeBSD-src-448e7c12908c8a8680ec5f93934de43b8ad1a06f.zip
FreeBSD-src-448e7c12908c8a8680ec5f93934de43b8ad1a06f.tar.gz
Add dev_strategy_csw() function, which is similar to dev_strategy()
but assumes that a thread reference was already obtained on the passed device. Use the function from physio(), to avoid two extra dev_mtx lock and unlock. Note that physio() is always used as the cdevsw method, or is called from a cdevsw method, and the caller already owns the reference. dev_strategy() is left to keep KPI intact, but now it is implemented as a wrapper around dev_strategy_csw(). Do some style cleanup in physio(). Requested and reviewed by: kan (previous version) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
Diffstat (limited to 'sys/sys/conf.h')
-rw-r--r--sys/sys/conf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index 8d53839..5a579b4 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -255,6 +255,7 @@ void dev_ref(struct cdev *dev);
void dev_refl(struct cdev *dev);
void dev_rel(struct cdev *dev);
void dev_strategy(struct cdev *dev, struct buf *bp);
+void dev_strategy_csw(struct cdev *dev, struct cdevsw *csw, struct buf *bp);
struct cdev *make_dev(struct cdevsw *_devsw, int _unit, uid_t _uid, gid_t _gid,
int _perms, const char *_fmt, ...) __printflike(6, 7);
struct cdev *make_dev_cred(struct cdevsw *_devsw, int _unit,
OpenPOWER on IntegriCloud