globus_fifo.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 1999-2006 University of Chicago
00003  * 
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  * 
00008  * http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef GLOBUS_FIFO_H
00018 #define GLOBUS_FIFO_H
00019 
00033 #include "globus_list.h"
00034  
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038 
00043 struct globus_fifo_s;
00048 typedef struct globus_fifo_s *                          globus_fifo_t;
00049 
00057 extern int
00058 globus_fifo_init(
00059     globus_fifo_t *                                     fifo);
00060 
00069 extern void
00070 globus_fifo_destroy(
00071     globus_fifo_t *                                     fifo);
00072 
00082 void
00083 globus_fifo_destroy_all(
00084     globus_fifo_t *                     fifo,
00085     void                                (*datum_free)(void *));
00086 
00092 extern int 
00093 globus_fifo_empty(
00094     const globus_fifo_t *                               fifo);
00095 
00101 extern int 
00102 globus_fifo_size(
00103     const globus_fifo_t *                               fifo);
00104 
00109 extern int
00110 globus_fifo_enqueue(
00111     globus_fifo_t *                                     fifo,
00112         void *                                              datum);
00113 
00119 extern globus_fifo_t *
00120 globus_fifo_copy(
00121     const globus_fifo_t *                               fifo);
00122 
00127 extern void *
00128 globus_fifo_peek(
00129     globus_fifo_t *                                     fifo);
00130 
00135 extern void *
00136 globus_fifo_tail_peek(
00137     globus_fifo_t *                                     fifo);
00138 
00143 extern void *
00144 globus_fifo_remove(
00145     globus_fifo_t *                                     headp, 
00146     void *                                              datum);
00147 
00152 extern void *
00153 globus_fifo_dequeue(
00154     globus_fifo_t *                                     fifo);
00155 
00160 extern int
00161 globus_fifo_move(
00162     globus_fifo_t *                                                     fifo_dest,
00163     globus_fifo_t *                                                     fifo_src);
00164 
00169 extern globus_list_t *
00170 globus_fifo_convert_to_list(
00171         globus_fifo_t *                                                                         fifo );
00172 
00173 #ifdef __cplusplus
00174 }
00175 #endif
00176 
00177 #endif /* GLOBUS_FIFO_H */

Generated on 17 Mar 2017 for globus_common by  doxygen 1.4.7