CUBRID Engine  latest
connection_list_sr.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Search Solution Corporation
3  * Copyright 2016 CUBRID Corporation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 
20 /*
21  * connection_list_sr.h -
22  */
23 
24 #ifndef _CONNECTION_LIST_SR_H_
25 #define _CONNECTION_LIST_SR_H_
26 
27 #ident "$Id$"
28 
31 { /* data list entry in the list */
32  CSS_LIST_ENTRY *next; /* point to the next css_list_entry */
33  void *data; /* point to data */
34 };
35 
36 typedef struct css_list CSS_LIST;
37 struct css_list
38 {
39  CSS_LIST_ENTRY *front; /* point to the first css_list_entry */
40  CSS_LIST_ENTRY **back; /* point to addr. of pointer to next */
41 
43  int count;
45 };
46 
47 enum
48 { TRAV_CONT = 0,
49  TRAV_STOP = 1,
52 };
53 
54 extern int css_initialize_list (CSS_LIST * ptr, int free_count);
55 extern int css_finalize_list (CSS_LIST * ptr);
56 #if defined (ENABLE_UNUSED_FUNCTION)
57 extern bool css_list_isempty (CSS_LIST * ptr);
58 extern int css_add_list_to_head (CSS_LIST * ptr, void *item);
59 extern int css_remove_list (CSS_LIST * ptr, void *item);
60 #endif
61 extern int css_add_list (CSS_LIST * ptr, void *item);
62 extern void *css_remove_list_from_head (CSS_LIST * ptr);
63 extern int css_traverse_list (CSS_LIST * ptr, int (*func) (void *, void *), void *arg);
64 
65 #endif /* _CONNECTION_LIST_SR_H_ */
void * data
int css_add_list(CSS_LIST *ptr, void *item)
CSS_LIST_ENTRY * next
CSS_LIST_ENTRY * free_list
int css_finalize_list(CSS_LIST *ptr)
void * css_remove_list_from_head(CSS_LIST *ptr)
int css_traverse_list(CSS_LIST *ptr, int(*func)(void *, void *), void *arg)
CSS_LIST_ENTRY ** back
int css_initialize_list(CSS_LIST *ptr, int free_count)
static int free_count
Definition: api_util.c:74
CSS_LIST_ENTRY * front