Revision 241
Updated libdragonfly documentation.
group__queue.html | ||
---|---|---|
1 | 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
2 |
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
|
2 |
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
|
3 | 3 |
<title>libwireless: Queue</title> |
4 | 4 |
<link href="doxygen.css" rel="stylesheet" type="text/css"> |
5 | 5 |
<link href="tabs.css" rel="stylesheet" type="text/css"> |
6 | 6 |
</head><body> |
7 |
<!-- Generated by Doxygen 1.4.6 -->
|
|
7 |
<!-- Generated by Doxygen 1.5.3 -->
|
|
8 | 8 |
<div class="tabs"> |
9 | 9 |
<ul> |
10 | 10 |
<li><a href="index.html"><span>Main Page</span></a></li> |
11 | 11 |
<li><a href="modules.html"><span>Modules</span></a></li> |
12 | 12 |
<li><a href="annotated.html"><span>Data Structures</span></a></li> |
13 | 13 |
<li><a href="files.html"><span>Files</span></a></li> |
14 |
</ul></div> |
|
14 |
</ul> |
|
15 |
</div> |
|
15 | 16 |
<h1>Queue</h1>A queue implementation. |
16 | 17 |
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0"> |
17 | 18 |
<tr><td></td></tr> |
... | ... | |
47 | 48 |
A queue implementation. |
48 | 49 |
<p> |
49 | 50 |
A queue implementation. <hr><h2>Function Documentation</h2> |
50 |
<a class="anchor" name="gcdb01f4d0c861c4981829920d3973b77"></a><!-- doxytag: member="queue.h::queue_add" ref="gcdb01f4d0c861c4981829920d3973b77" args="(Queue *q, void *item)" --><p> |
|
51 |
<table class="mdTable" cellpadding="2" cellspacing="0"> |
|
52 |
<tr> |
|
53 |
<td class="mdRow"> |
|
54 |
<table cellpadding="0" cellspacing="0" border="0"> |
|
51 |
<a class="anchor" name="gcdb01f4d0c861c4981829920d3973b77"></a><!-- doxytag: member="queue.h::queue_add" ref="gcdb01f4d0c861c4981829920d3973b77" args="(Queue *q, void *item)" --> |
|
52 |
<div class="memitem"> |
|
53 |
<div class="memproto"> |
|
54 |
<table class="memname"> |
|
55 | 55 |
<tr> |
56 |
<td class="md" nowrap valign="top">void queue_add </td>
|
|
57 |
<td class="md" valign="top">( </td>
|
|
58 |
<td class="md" nowrap valign="top"><a class="el" href="structQueue.html">Queue</a> * </td>
|
|
59 |
<td class="mdname" nowrap> <em>q</em>, </td>
|
|
56 |
<td class="memname">void queue_add </td>
|
|
57 |
<td>(</td>
|
|
58 |
<td class="paramtype"><a class="el" href="structQueue.html">Queue</a> * </td>
|
|
59 |
<td class="paramname"> <em>q</em>, </td>
|
|
60 | 60 |
</tr> |
61 | 61 |
<tr> |
62 |
<td class="md" nowrap align="right"></td>
|
|
63 |
<td class="md"></td>
|
|
64 |
<td class="md" nowrap>void * </td>
|
|
65 |
<td class="mdname" nowrap> <em>item</em></td>
|
|
62 |
<td class="paramkey"></td>
|
|
63 |
<td></td> |
|
64 |
<td class="paramtype">void * </td>
|
|
65 |
<td class="paramname"> <em>item</em></td><td> </td>
|
|
66 | 66 |
</tr> |
67 | 67 |
<tr> |
68 |
<td class="md"></td>
|
|
69 |
<td class="md">) </td>
|
|
70 |
<td class="md" colspan="2"></td>
|
|
68 |
<td></td> |
|
69 |
<td>)</td>
|
|
70 |
<td></td><td></td><td width="100%"></td>
|
|
71 | 71 |
</tr> |
72 | 72 |
</table> |
73 |
</td> |
|
74 |
</tr> |
|
75 |
</table> |
|
76 |
<table cellspacing="5" cellpadding="0" border="0"> |
|
77 |
<tr> |
|
78 |
<td> |
|
79 |
|
|
80 |
</td> |
|
81 |
<td> |
|
73 |
</div> |
|
74 |
<div class="memdoc"> |
|
82 | 75 |
|
83 | 76 |
<p> |
84 | 77 |
Add an element to a queue. |
... | ... | |
90 | 83 |
<tr><td valign="top"></td><td valign="top"><em>item</em> </td><td>the item to add to the queue </td></tr> |
91 | 84 |
</table> |
92 | 85 |
</dl> |
93 |
</td> |
|
94 |
</tr> |
|
95 |
</table> |
|
96 |
<a class="anchor" name="gd79af6a8d562cb911d93f35b8825e148"></a><!-- doxytag: member="queue.h::queue_create" ref="gd79af6a8d562cb911d93f35b8825e148" args="(void)" --><p> |
|
97 |
<table class="mdTable" cellpadding="2" cellspacing="0"> |
|
98 |
<tr> |
|
99 |
<td class="mdRow"> |
|
100 |
<table cellpadding="0" cellspacing="0" border="0"> |
|
86 |
|
|
87 |
</div> |
|
88 |
</div><p> |
|
89 |
<a class="anchor" name="gd79af6a8d562cb911d93f35b8825e148"></a><!-- doxytag: member="queue.h::queue_create" ref="gd79af6a8d562cb911d93f35b8825e148" args="(void)" --> |
|
90 |
<div class="memitem"> |
|
91 |
<div class="memproto"> |
|
92 |
<table class="memname"> |
|
101 | 93 |
<tr> |
102 |
<td class="md" nowrap valign="top"><a class="el" href="structQueue.html">Queue</a>* queue_create </td>
|
|
103 |
<td class="md" valign="top">( </td>
|
|
104 |
<td class="md" nowrap valign="top">void </td>
|
|
105 |
<td class="mdname1" valign="top" nowrap> </td>
|
|
106 |
<td class="md" valign="top"> ) </td>
|
|
107 |
<td class="md" nowrap></td>
|
|
94 |
<td class="memname"><a class="el" href="structQueue.html">Queue</a>* queue_create </td>
|
|
95 |
<td>(</td>
|
|
96 |
<td class="paramtype">void </td>
|
|
97 |
<td class="paramname"> </td>
|
|
98 |
<td> ) </td> |
|
99 |
<td width="100%"></td>
|
|
108 | 100 |
</tr> |
109 | 101 |
</table> |
110 |
</td> |
|
111 |
</tr> |
|
112 |
</table> |
|
113 |
<table cellspacing="5" cellpadding="0" border="0"> |
|
114 |
<tr> |
|
115 |
<td> |
|
116 |
|
|
117 |
</td> |
|
118 |
<td> |
|
102 |
</div> |
|
103 |
<div class="memdoc"> |
|
119 | 104 |
|
120 | 105 |
<p> |
121 | 106 |
Create a new queue. |
122 | 107 |
<p> |
123 | 108 |
Create a queue.<p> |
124 |
<dl compact><dt><b>Returns:</b></dt><dd>the newly created queue. </dd></dl> |
|
125 |
</td> |
|
126 |
</tr> |
|
127 |
</table> |
|
128 |
<a class="anchor" name="gd21ee75924298937673e2b8d66665466"></a><!-- doxytag: member="queue.h::queue_destroy" ref="gd21ee75924298937673e2b8d66665466" args="(Queue *q)" --><p> |
|
129 |
<table class="mdTable" cellpadding="2" cellspacing="0"> |
|
130 |
<tr> |
|
131 |
<td class="mdRow"> |
|
132 |
<table cellpadding="0" cellspacing="0" border="0"> |
|
109 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the newly created queue. </dd></dl> |
|
110 |
|
|
111 |
</div> |
|
112 |
</div><p> |
|
113 |
<a class="anchor" name="gd21ee75924298937673e2b8d66665466"></a><!-- doxytag: member="queue.h::queue_destroy" ref="gd21ee75924298937673e2b8d66665466" args="(Queue *q)" --> |
|
114 |
<div class="memitem"> |
|
115 |
<div class="memproto"> |
|
116 |
<table class="memname"> |
|
133 | 117 |
<tr> |
134 |
<td class="md" nowrap valign="top">void queue_destroy </td>
|
|
135 |
<td class="md" valign="top">( </td>
|
|
136 |
<td class="md" nowrap valign="top"><a class="el" href="structQueue.html">Queue</a> * </td>
|
|
137 |
<td class="mdname1" valign="top" nowrap> <em>q</em> </td>
|
|
138 |
<td class="md" valign="top"> ) </td>
|
|
139 |
<td class="md" nowrap></td>
|
|
118 |
<td class="memname">void queue_destroy </td>
|
|
119 |
<td>(</td>
|
|
120 |
<td class="paramtype"><a class="el" href="structQueue.html">Queue</a> * </td>
|
|
121 |
<td class="paramname"> <em>q</em> </td>
|
|
122 |
<td> ) </td> |
|
123 |
<td width="100%"></td>
|
|
140 | 124 |
</tr> |
141 | 125 |
</table> |
142 |
</td> |
|
143 |
</tr> |
|
144 |
</table> |
|
145 |
<table cellspacing="5" cellpadding="0" border="0"> |
|
146 |
<tr> |
|
147 |
<td> |
|
148 |
|
|
149 |
</td> |
|
150 |
<td> |
|
126 |
</div> |
|
127 |
<div class="memdoc"> |
|
151 | 128 |
|
152 | 129 |
<p> |
153 | 130 |
Destroy a queue. |
... | ... | |
158 | 135 |
<tr><td valign="top"></td><td valign="top"><em>q</em> </td><td>the queue to destroy </td></tr> |
159 | 136 |
</table> |
160 | 137 |
</dl> |
161 |
</td> |
|
162 |
</tr> |
|
163 |
</table> |
|
164 |
<a class="anchor" name="ga67a7f9940e9bbf21320a6f41e60998e"></a><!-- doxytag: member="queue.h::queue_is_empty" ref="ga67a7f9940e9bbf21320a6f41e60998e" args="(Queue *q)" --><p> |
|
165 |
<table class="mdTable" cellpadding="2" cellspacing="0"> |
|
166 |
<tr> |
|
167 |
<td class="mdRow"> |
|
168 |
<table cellpadding="0" cellspacing="0" border="0"> |
|
138 |
|
|
139 |
</div> |
|
140 |
</div><p> |
|
141 |
<a class="anchor" name="ga67a7f9940e9bbf21320a6f41e60998e"></a><!-- doxytag: member="queue.h::queue_is_empty" ref="ga67a7f9940e9bbf21320a6f41e60998e" args="(Queue *q)" --> |
|
142 |
<div class="memitem"> |
|
143 |
<div class="memproto"> |
|
144 |
<table class="memname"> |
|
169 | 145 |
<tr> |
170 |
<td class="md" nowrap valign="top">int queue_is_empty </td>
|
|
171 |
<td class="md" valign="top">( </td>
|
|
172 |
<td class="md" nowrap valign="top"><a class="el" href="structQueue.html">Queue</a> * </td>
|
|
173 |
<td class="mdname1" valign="top" nowrap> <em>q</em> </td>
|
|
174 |
<td class="md" valign="top"> ) </td>
|
|
175 |
<td class="md" nowrap></td>
|
|
146 |
<td class="memname">int queue_is_empty </td>
|
|
147 |
<td>(</td>
|
|
148 |
<td class="paramtype"><a class="el" href="structQueue.html">Queue</a> * </td>
|
|
149 |
<td class="paramname"> <em>q</em> </td>
|
|
150 |
<td> ) </td> |
|
151 |
<td width="100%"></td>
|
|
176 | 152 |
</tr> |
177 | 153 |
</table> |
178 |
</td> |
|
179 |
</tr> |
|
180 |
</table> |
|
181 |
<table cellspacing="5" cellpadding="0" border="0"> |
|
182 |
<tr> |
|
183 |
<td> |
|
184 |
|
|
185 |
</td> |
|
186 |
<td> |
|
154 |
</div> |
|
155 |
<div class="memdoc"> |
|
187 | 156 |
|
188 | 157 |
<p> |
189 | 158 |
Check if the queue is empty. |
... | ... | |
194 | 163 |
<tr><td valign="top"></td><td valign="top"><em>q</em> </td><td>the queue to check </td></tr> |
195 | 164 |
</table> |
196 | 165 |
</dl> |
197 |
<dl compact><dt><b>Returns:</b></dt><dd>nonzero if the queue is empty, 0 otherwise </dd></dl> |
|
198 |
</td> |
|
199 |
</tr> |
|
200 |
</table> |
|
201 |
<a class="anchor" name="gef91e5f119b77101f6c2e23eb1803059"></a><!-- doxytag: member="queue.h::queue_remove" ref="gef91e5f119b77101f6c2e23eb1803059" args="(Queue *q)" --><p> |
|
202 |
<table class="mdTable" cellpadding="2" cellspacing="0"> |
|
203 |
<tr> |
|
204 |
<td class="mdRow"> |
|
205 |
<table cellpadding="0" cellspacing="0" border="0"> |
|
166 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>nonzero if the queue is empty, 0 otherwise </dd></dl> |
|
167 |
|
|
168 |
</div> |
|
169 |
</div><p> |
|
170 |
<a class="anchor" name="gef91e5f119b77101f6c2e23eb1803059"></a><!-- doxytag: member="queue.h::queue_remove" ref="gef91e5f119b77101f6c2e23eb1803059" args="(Queue *q)" --> |
|
171 |
<div class="memitem"> |
|
172 |
<div class="memproto"> |
|
173 |
<table class="memname"> |
|
206 | 174 |
<tr> |
207 |
<td class="md" nowrap valign="top">void* queue_remove </td>
|
|
208 |
<td class="md" valign="top">( </td>
|
|
209 |
<td class="md" nowrap valign="top"><a class="el" href="structQueue.html">Queue</a> * </td>
|
|
210 |
<td class="mdname1" valign="top" nowrap> <em>q</em> </td>
|
|
211 |
<td class="md" valign="top"> ) </td>
|
|
212 |
<td class="md" nowrap></td>
|
|
175 |
<td class="memname">void* queue_remove </td>
|
|
176 |
<td>(</td>
|
|
177 |
<td class="paramtype"><a class="el" href="structQueue.html">Queue</a> * </td>
|
|
178 |
<td class="paramname"> <em>q</em> </td>
|
|
179 |
<td> ) </td> |
|
180 |
<td width="100%"></td>
|
|
213 | 181 |
</tr> |
214 | 182 |
</table> |
215 |
</td> |
|
216 |
</tr> |
|
217 |
</table> |
|
218 |
<table cellspacing="5" cellpadding="0" border="0"> |
|
219 |
<tr> |
|
220 |
<td> |
|
221 |
|
|
222 |
</td> |
|
223 |
<td> |
|
183 |
</div> |
|
184 |
<div class="memdoc"> |
|
224 | 185 |
|
225 | 186 |
<p> |
226 | 187 |
Remove an element from a queue. |
... | ... | |
231 | 192 |
<tr><td valign="top"></td><td valign="top"><em>q</em> </td><td>the queue to remove the element from</td></tr> |
232 | 193 |
</table> |
233 | 194 |
</dl> |
234 |
<dl compact><dt><b>Returns:</b></dt><dd>the element which was removed </dd></dl> |
|
235 |
</td> |
|
236 |
</tr> |
|
237 |
</table> |
|
238 |
<a class="anchor" name="gbfe7f6f65eaffa1ee166811f259807e4"></a><!-- doxytag: member="queue.h::queue_remove_all" ref="gbfe7f6f65eaffa1ee166811f259807e4" args="(Queue *q, void *item)" --><p> |
|
239 |
<table class="mdTable" cellpadding="2" cellspacing="0"> |
|
240 |
<tr> |
|
241 |
<td class="mdRow"> |
|
242 |
<table cellpadding="0" cellspacing="0" border="0"> |
|
195 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the element which was removed </dd></dl> |
|
196 |
|
|
197 |
</div> |
|
198 |
</div><p> |
|
199 |
<a class="anchor" name="gbfe7f6f65eaffa1ee166811f259807e4"></a><!-- doxytag: member="queue.h::queue_remove_all" ref="gbfe7f6f65eaffa1ee166811f259807e4" args="(Queue *q, void *item)" --> |
|
200 |
<div class="memitem"> |
|
201 |
<div class="memproto"> |
|
202 |
<table class="memname"> |
|
243 | 203 |
<tr> |
244 |
<td class="md" nowrap valign="top">void queue_remove_all </td>
|
|
245 |
<td class="md" valign="top">( </td>
|
|
246 |
<td class="md" nowrap valign="top"><a class="el" href="structQueue.html">Queue</a> * </td>
|
|
247 |
<td class="mdname" nowrap> <em>q</em>, </td>
|
|
204 |
<td class="memname">void queue_remove_all </td>
|
|
205 |
<td>(</td>
|
|
206 |
<td class="paramtype"><a class="el" href="structQueue.html">Queue</a> * </td>
|
|
207 |
<td class="paramname"> <em>q</em>, </td>
|
|
248 | 208 |
</tr> |
249 | 209 |
<tr> |
250 |
<td class="md" nowrap align="right"></td>
|
|
251 |
<td class="md"></td>
|
|
252 |
<td class="md" nowrap>void * </td>
|
|
253 |
<td class="mdname" nowrap> <em>item</em></td>
|
|
210 |
<td class="paramkey"></td>
|
|
211 |
<td></td> |
|
212 |
<td class="paramtype">void * </td>
|
|
213 |
<td class="paramname"> <em>item</em></td><td> </td>
|
|
254 | 214 |
</tr> |
255 | 215 |
<tr> |
256 |
<td class="md"></td>
|
|
257 |
<td class="md">) </td>
|
|
258 |
<td class="md" colspan="2"></td>
|
|
216 |
<td></td> |
|
217 |
<td>)</td>
|
|
218 |
<td></td><td></td><td width="100%"></td>
|
|
259 | 219 |
</tr> |
260 | 220 |
</table> |
261 |
</td> |
|
262 |
</tr> |
|
263 |
</table> |
|
264 |
<table cellspacing="5" cellpadding="0" border="0"> |
|
265 |
<tr> |
|
266 |
<td> |
|
267 |
|
|
268 |
</td> |
|
269 |
<td> |
|
221 |
</div> |
|
222 |
<div class="memdoc"> |
|
270 | 223 |
|
271 | 224 |
<p> |
272 | 225 |
Remove all instances of a given element from a queue. |
... | ... | |
278 | 231 |
<tr><td valign="top"></td><td valign="top"><em>item</em> </td><td>the element to remove all instances of </td></tr> |
279 | 232 |
</table> |
280 | 233 |
</dl> |
281 |
</td> |
|
282 |
</tr> |
|
283 |
</table> |
|
284 |
<a class="anchor" name="g97ae0b085c41d49c8a24e1e506967f9b"></a><!-- doxytag: member="queue.h::queue_size" ref="g97ae0b085c41d49c8a24e1e506967f9b" args="(Queue *q)" --><p> |
|
285 |
<table class="mdTable" cellpadding="2" cellspacing="0"> |
|
286 |
<tr> |
|
287 |
<td class="mdRow"> |
|
288 |
<table cellpadding="0" cellspacing="0" border="0"> |
|
234 |
|
|
235 |
</div> |
|
236 |
</div><p> |
|
237 |
<a class="anchor" name="g97ae0b085c41d49c8a24e1e506967f9b"></a><!-- doxytag: member="queue.h::queue_size" ref="g97ae0b085c41d49c8a24e1e506967f9b" args="(Queue *q)" --> |
|
238 |
<div class="memitem"> |
|
239 |
<div class="memproto"> |
|
240 |
<table class="memname"> |
|
289 | 241 |
<tr> |
290 |
<td class="md" nowrap valign="top">int queue_size </td>
|
|
291 |
<td class="md" valign="top">( </td>
|
|
292 |
<td class="md" nowrap valign="top"><a class="el" href="structQueue.html">Queue</a> * </td>
|
|
293 |
<td class="mdname1" valign="top" nowrap> <em>q</em> </td>
|
|
294 |
<td class="md" valign="top"> ) </td>
|
|
295 |
<td class="md" nowrap></td>
|
|
242 |
<td class="memname">int queue_size </td>
|
|
243 |
<td>(</td>
|
|
244 |
<td class="paramtype"><a class="el" href="structQueue.html">Queue</a> * </td>
|
|
245 |
<td class="paramname"> <em>q</em> </td>
|
|
246 |
<td> ) </td> |
|
247 |
<td width="100%"></td>
|
|
296 | 248 |
</tr> |
297 | 249 |
</table> |
298 |
</td> |
|
299 |
</tr> |
|
300 |
</table> |
|
301 |
<table cellspacing="5" cellpadding="0" border="0"> |
|
302 |
<tr> |
|
303 |
<td> |
|
304 |
|
|
305 |
</td> |
|
306 |
<td> |
|
250 |
</div> |
|
251 |
<div class="memdoc"> |
|
307 | 252 |
|
308 | 253 |
<p> |
309 | 254 |
Get the size of a queue. |
... | ... | |
314 | 259 |
<tr><td valign="top"></td><td valign="top"><em>q</em> </td><td>the queue to get the size of </td></tr> |
315 | 260 |
</table> |
316 | 261 |
</dl> |
317 |
<dl compact><dt><b>Returns:</b></dt><dd>the size of the queue </dd></dl> |
|
318 |
</td> |
|
319 |
</tr>
|
|
320 |
</table>
|
|
321 |
<hr size="1"><address style="align: right;"><small>Generated on Wed Oct 31 17:54:43 2007 for libwireless by
|
|
262 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the size of the queue </dd></dl>
|
|
263 |
|
|
264 |
</div>
|
|
265 |
</div><p>
|
|
266 |
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Nov 8 22:16:24 2007 for libwireless by
|
|
322 | 267 |
<a href="http://www.doxygen.org/index.html"> |
323 |
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
|
268 |
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
|
|
324 | 269 |
</body> |
325 | 270 |
</html> |
Also available in: Unified diff