diff options
author | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 2001-03-16 02:32:49 +0000 |
---|---|---|
committer | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 2001-03-16 02:32:49 +0000 |
commit | 906812a13b87b95f4f51a2f7c33772cc9367b711 (patch) | |
tree | e014e5e781a6f04a65d858ddc5d2fddfd0946658 /share | |
parent | c424a5f44d0d0f62f9e11c21ba363d26a792cef3 (diff) |
vwaitforio
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/Makefile | 5 | ||||
-rw-r--r-- | share/man/man9/vwaitforio.9 | 45 |
2 files changed, 48 insertions, 2 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 0608e3c37f1..85d734c8e11 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.34 2001/03/15 23:21:39 csapuntz Exp $ +# $OpenBSD: Makefile,v 1.35 2001/03/16 02:32:48 csapuntz Exp $ # $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -12,7 +12,8 @@ MAN= audio.9 boot.9 bus_dma.9 bus_space.9 \ ratecheck.9 resettodr.9 random.9 shutdownhook_establish.9 \ sleep.9 spl.9 store.9 style.9 time.9 timeout.9 uvm.9 \ vm_allocate.9 vm_map_copy.9 vm_deallocate.9 \ - vm_map_inherit.9 vm_map_protect.9 vnode.9 vn_lock.9 + vm_map_inherit.9 vm_map_protect.9 vnode.9 vn_lock.9 \ + vwaitforio.9 vwaitforio.9 MLINKS+=bus_dma.9 bus_dmamap_create.9 bus_dma.9 bus_dmamap_destroy.9 \ bus_dma.9 bus_dmamap_load.9 bus_dma.9 bus_dmamap_load_mbuf.9 \ diff --git a/share/man/man9/vwaitforio.9 b/share/man/man9/vwaitforio.9 new file mode 100644 index 00000000000..39f2d106504 --- /dev/null +++ b/share/man/man9/vwaitforio.9 @@ -0,0 +1,45 @@ +.Dd February 26, 2001 +.Dt vwaitforio 9 +.Os OpenBSD 2.9 +.Sh NAME +.Nm vwaitforio +.Nd wait for all outstanding +.Sh SYNOPSIS +.Fd #include <sys/types.h> +.Fd #include <sys/vnode.h> +.Ft int +.Fn "vwaitforio" "struct vnode *vp" "int slpflag" "char *wmesg" "int slptimeo" +.Sh DESCRIPTION +The +.Fn vwaitforio +call sleeps until all asynchronous writes associated with the vnode +.Nm vp +finish. This is used by functions that need to make sure +that the writes they initiated have completed. +.Pp +The +.Fn vwaitforio +call sleeps at PRIBIO + 1. The +.Nm slpflag , +.Nm wmesg , +and +.Nm slptimeo +flags indicate flags to be passed to +.Xr tsleep 9 . +.Pp +This function must be called at splbio(). +.Pp +It may be important to ensure that no other process submits asynchronous +writes while you are waiting for I/O on this vnode. Otherwise, +vwaitforio may never return. +.Pp +(Vnode interlock??) +.Sh RETURN VALUES +The +.Fn vwaitforio +function returns 0 on success. See +.Xr tsleep 9 +for possible error returns. +.Sh SEE ALSO +.Xr vnode 9 , +.Xr tsleep 9 |