aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/bio.h
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2002-09-13 11:28:31 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2002-09-13 11:28:31 +0000
commitc7143e71505ac146245e3db3eadedda2fa034298 (patch)
tree9f94a84da337f90a627c0c82f184c5422f3616d9 /sys/sys/bio.h
parent9f6f6b7c2be500cef29b6d2ef84c9eec332ff8e1 (diff)
downloadsrc-c7143e71505ac146245e3db3eadedda2fa034298.tar.gz
src-c7143e71505ac146245e3db3eadedda2fa034298.zip
Oops, broke the build there. Uninline biodone() now that it is non-trivial.
Introduce biowait() function. Currently there is a race condition and the mitigation is a timeout/retry. It is not obvious what kind of locking (if any) is suitable for BIO_DONE, since the majority of users take are of this themselves, and only a few places actually rely on the wakeup. Sponsored by: DARPA & NAI Labs.
Notes
Notes: svn path=/head/; revision=103281
Diffstat (limited to 'sys/sys/bio.h')
-rw-r--r--sys/sys/bio.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/sys/bio.h b/sys/sys/bio.h
index 7f2d64b6e68e..173636bf9c39 100644
--- a/sys/sys/bio.h
+++ b/sys/sys/bio.h
@@ -107,15 +107,8 @@ struct bio {
struct uio;
-static __inline__ void
-biodone(struct bio *bp)
-{
- bp->bio_flags |= BIO_DONE;
- if (bp->bio_done != NULL)
- bp->bio_done(bp);
- else
- wakeup(bp);
-}
+void biodone(struct bio *bp);
+int biowait(struct bio *bp, const char *wchan);
#ifndef _DEVICESTAT_H
struct devstat;