g_event.9 (131594) | g_event.9 (131689) |
---|---|
1.\" 2.\" Copyright (c) 2004 Pawel Jakub Dawidek <pjd@FreeBSD.org> 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright --- 8 unchanged lines hidden (view full) --- 17.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 18.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24.\" | 1.\" 2.\" Copyright (c) 2004 Pawel Jakub Dawidek <pjd@FreeBSD.org> 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright --- 8 unchanged lines hidden (view full) --- 17.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 18.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24.\" |
25.\" $FreeBSD: head/share/man/man9/g_event.9 131594 2004-07-04 20:55:50Z ru $ | 25.\" $FreeBSD: head/share/man/man9/g_event.9 131689 2004-07-06 08:21:12Z ru $ |
26.\" 27.Dd January 16, 2004 | 26.\" 27.Dd January 16, 2004 |
28.Dt g_event 9 | 28.Dt G_EVENT 9 |
29.Os 30.Sh NAME 31.Nm g_post_event , 32.Nm g_waitfor_event , 33.Nm g_cancel_event 34.Nd "GEOM events management" 35.Sh SYNOPSIS 36.In geom/geom.h --- 78 unchanged lines hidden (view full) --- 115.Dv M_NOWAIT . 116.It 117The list of references has to end with a 118.Dv NULL 119value. 120.It 121The 122.Fn g_waitfor_event | 29.Os 30.Sh NAME 31.Nm g_post_event , 32.Nm g_waitfor_event , 33.Nm g_cancel_event 34.Nd "GEOM events management" 35.Sh SYNOPSIS 36.In geom/geom.h --- 78 unchanged lines hidden (view full) --- 115.Dv M_NOWAIT . 116.It 117The list of references has to end with a 118.Dv NULL 119value. 120.It 121The 122.Fn g_waitfor_event |
123function can not be called from an event, since doing so would result | 123function cannot be called from an event, since doing so would result |
124in a deadlock. 125.El 126.Sh RETURN VALUES | 124in a deadlock. 125.El 126.Sh RETURN VALUES |
127The |
|
127.Fn g_post_event 128and 129.Fn g_waitfor_event | 128.Fn g_post_event 129and 130.Fn g_waitfor_event |
131functions |
|
130return 0 if successful; otherwise an error code is returned. 131.Sh ERRORS 132Possible errors for the 133.Fn g_post_event 134function: 135.Bl -tag -width Er 136.It Bq Er ENOMEM 137The 138.Fa flag | 132return 0 if successful; otherwise an error code is returned. 133.Sh ERRORS 134Possible errors for the 135.Fn g_post_event 136function: 137.Bl -tag -width Er 138.It Bq Er ENOMEM 139The 140.Fa flag |
139argument was set to M_NOWAIT and there was insufficient memory. | 141argument was set to 142.Dv M_NOWAIT 143and there was insufficient memory. |
140.El 141.Pp 142Possible errors for the 143.Fn g_waitfor_event 144function: 145.Bl -tag -width Er 146.It Bq Er EAGAIN 147The event was canceled. 148.It Bq Er ENOMEM 149The 150.Fa flag | 144.El 145.Pp 146Possible errors for the 147.Fn g_waitfor_event 148function: 149.Bl -tag -width Er 150.It Bq Er EAGAIN 151The event was canceled. 152.It Bq Er ENOMEM 153The 154.Fa flag |
151argument was set to M_NOWAIT and there was insufficient memory. | 155argument was set to 156.Dv M_NOWAIT 157and there was insufficient memory. |
152.El 153.Sh EXAMPLES 154Example of a function called from the event queue. 155.Bd -literal -offset indent 156void 157example_event(void *arg, int flag) 158{ 159 --- 24 unchanged lines hidden --- | 158.El 159.Sh EXAMPLES 160Example of a function called from the event queue. 161.Bd -literal -offset indent 162void 163example_event(void *arg, int flag) 164{ 165 --- 24 unchanged lines hidden --- |