aboutsummaryrefslogtreecommitdiff
path: root/share/man/man9/g_event.9
diff options
context:
space:
mode:
authorLukas Ertl <le@FreeBSD.org>2004-05-18 11:33:37 +0000
committerLukas Ertl <le@FreeBSD.org>2004-05-18 11:33:37 +0000
commiteaad868d166ff71214c5aecd2bfee938372d1df6 (patch)
tree7d95d47477388eec97ecc5d5b75e4384b3420be3 /share/man/man9/g_event.9
parentca2ffd263384169db9b6f75fa32fae5dfa1c72b4 (diff)
downloadsrc-eaad868d166ff71214c5aecd2bfee938372d1df6.tar.gz
src-eaad868d166ff71214c5aecd2bfee938372d1df6.zip
Update several GEOM related manual pages:
*) Fix spelling errors. *) Better english. *) Re-phrasing. Not Reviewed by: pjd (one week timeout) Approved by: grog (mentor)
Notes
Notes: svn path=/head/; revision=129381
Diffstat (limited to 'share/man/man9/g_event.9')
-rw-r--r--share/man/man9/g_event.951
1 files changed, 27 insertions, 24 deletions
diff --git a/share/man/man9/g_event.9 b/share/man/man9/g_event.9
index 7585b4c693ea..f0a512c6a601 100644
--- a/share/man/man9/g_event.9
+++ b/share/man/man9/g_event.9
@@ -31,7 +31,7 @@
.Nm g_post_event ,
.Nm g_waitfor_event ,
.Nm g_cancel_event
-.Nd "events management"
+.Nd "GEOM events management"
.Sh SYNOPSIS
.In geom/geom.h
.Ft int
@@ -41,34 +41,33 @@
.Ft void
.Fn g_cancel_event "void *ref"
.Sh DESCRIPTION
-The GEOM has its own event queue to inform classes about important things.
-The event queue can be also used by classes, mostly for running away
-from I/O path.
-Sleeping, heavy weight tasks, etc. are not permitted on I/O path and
-events are the cure to avoid such situations.
+The GEOM framework has its own event queue to inform classes about important
+events.
+The event queue can be also used by GEOM classes themselves, for example
+to work around some restrictions in the I/O path, where sleeping, heavy weight
+tasks, etc. are not permitted.
.Pp
The
.Fn g_post_event
-function tells GEOM to call function
+function tells the GEOM framework to call function
.Fa func
with argument
.Fa arg
from the event queue.
The
.Fa flag
-argument is a flag for
+argument is passed to
.Xr malloc 9
-that should be used by GEOM.
-Only the flags
+for memory allocations inside of
+.Fn g_post_event .
+The only allowed flags are
.Dv M_WAITOK
-or
-.Dv M_NOWAIT
-can be used.
-The rest of the arguments are used as references.
-An event can be canceled by using any of given references as an
-argument to the
-.Fn g_cancel_event
-function.
+and
+.Dv M_NOWAIT .
+The rest of the arguments are used as references to identify the event.
+An event can be canceled by using any of the given references as an
+argument to
+.Fn g_cancel_event .
The list of references has to end with a
.Dv NULL
value.
@@ -82,7 +81,7 @@ It waits until the event is finished or canceled and then returns.
.Pp
The
.Fn g_cancel_event
-function cancels event(s) identified by
+function cancels all event(s) identified by
.Fa ref .
Cancellation is equivalent to calling the requested function
with requested arguments and argument
@@ -128,24 +127,28 @@ in a deadlock.
.Fn g_post_event
and
.Fn g_waitfor_event
-returns the value 0 if successful; otherwise an error code is returned.
+return 0 if successful; otherwise an error code is returned.
.Sh ERRORS
-Possible errors for
+Possible errors for the
.Fn g_post_event
function:
.Bl -tag -width Er
.It Bq Er ENOMEM
-There was insufficient memory.
+The
+.Fa flag
+argument was set to M_NOWAIT and there was insufficient memory.
.El
.Pp
-Possible errors for
+Possible errors for the
.Fn g_waitfor_event
function:
.Bl -tag -width Er
.It Bq Er EAGAIN
The event was canceled.
.It Bq Er ENOMEM
-There was insufficient memory.
+The
+.Fa flag
+argument was set to M_NOWAIT and there was insufficient memory.
.El
.Sh EXAMPLES
Example of a function called from the event queue.