globus_common  15.26
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
globus_priority_q.h
Go to the documentation of this file.
1 /*
2  * Copyright 1999-2006 University of Chicago
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
22 #ifndef GLOBUS_PRIORITY_Q_H
23 #define GLOBUS_PRIORITY_Q_H
24 
25 #include "globus_types.h"
26 #include "globus_memory.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
86  void * priority_1,
87  void * priority_2);
88 
97 typedef struct globus_priority_q_s
98 {
99  struct globus_l_priority_q_entry_s ** heap;
100  int next_slot;
101  size_t max_len;
102  globus_memory_t memory;
105 
106 int
108  globus_priority_q_t * priority_q,
110 
111 int
113  globus_priority_q_t * priority_q);
114 
117  globus_priority_q_t * priority_q);
118 
119 int
121  globus_priority_q_t * priority_q);
122 
123 int
125  globus_priority_q_t * priority_q,
126  void * datum,
127  void * priority);
128 
129 void *
131  globus_priority_q_t * priority_q,
132  void * datum);
133 
134 /*
135  * it is acceptable to modify the priority already stored within the queue
136  * before making this call. The old priority is not looked at
137  */
138 void *
140  globus_priority_q_t * priority_q,
141  void * datum,
142  void * new_priority);
143 
144 void *
146  globus_priority_q_t * priority_q);
147 
148 void *
150  globus_priority_q_t * priority_q);
151 
152 void *
154  globus_priority_q_t * priority_q);
155 
156 
157 #ifdef __cplusplus
158 }
159 #endif
160 
161 #endif /* GLOBUS_PRIORITY_Q_H */