g_consumer.9 (125699) | g_consumer.9 (125768) |
---|---|
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_consumer.9 125699 2004-02-11 10:06:18Z pjd $ | 25.\" $FreeBSD: head/share/man/man9/g_consumer.9 125768 2004-02-13 08:42:10Z pjd $ |
26.\" 27.Dd January 16, 2004 28.Dt g_consumer 9 29.Os 30.Sh NAME 31.Nm g_new_consumer , 32.Nm g_destroy_consumer 33.Nd "GEOM consumers management" --- 65 unchanged lines hidden (view full) --- 99 if (cp == NULL) 100 return; 101 /* Attach newly created consumer to given provider. */ 102 if (g_attach(cp, pp) != 0) { 103 g_destroy_consumer(cp); 104 return; 105 } 106 /* Open provider for reading through our consumer. */ | 26.\" 27.Dd January 16, 2004 28.Dt g_consumer 9 29.Os 30.Sh NAME 31.Nm g_new_consumer , 32.Nm g_destroy_consumer 33.Nd "GEOM consumers management" --- 65 unchanged lines hidden (view full) --- 99 if (cp == NULL) 100 return; 101 /* Attach newly created consumer to given provider. */ 102 if (g_attach(cp, pp) != 0) { 103 g_destroy_consumer(cp); 104 return; 105 } 106 /* Open provider for reading through our consumer. */ |
107 if (g_access_rel(cp, 1, 0, 0) != 0) { | 107 if (g_access(cp, 1, 0, 0) != 0) { |
108 g_detach(cp); 109 g_destroy_consumer(cp); 110 return; 111 } 112 113 g_topology_unlock(); 114 /* 115 * Read data from provider. 116 */ 117 g_topology_lock(); 118 119 /* Disconnect from provider (release access count). */ | 108 g_detach(cp); 109 g_destroy_consumer(cp); 110 return; 111 } 112 113 g_topology_unlock(); 114 /* 115 * Read data from provider. 116 */ 117 g_topology_lock(); 118 119 /* Disconnect from provider (release access count). */ |
120 g_access_rel(cp, -1, 0, 0); | 120 g_access(cp, -1, 0, 0); |
121 /* Detach from provider. */ 122 g_detach(cp); 123 /* Destroy consumer. */ 124 g_destroy_consumer(cp); 125} 126.Ed 127.Sh SEE ALSO 128.Xr DECLARE_GEOM_CLASS 9 , --- 13 unchanged lines hidden --- | 121 /* Detach from provider. */ 122 g_detach(cp); 123 /* Destroy consumer. */ 124 g_destroy_consumer(cp); 125} 126.Ed 127.Sh SEE ALSO 128.Xr DECLARE_GEOM_CLASS 9 , --- 13 unchanged lines hidden --- |