34static void clusterlist_add_postinit (
cluster_t* cluster);
35static cluster_t* clusterlist_find_postinit (
const char* host);
36static cluster_t* clusterlist_first_postinit();
37static cluster_t* clusterlist_next_postinit();
38static cluster_t* clusterlist_get_postinit();
40static void clusterlist_init() {
43 clusterlist_cursor =
NULL;
53static void clusterlist_add_postinit (
cluster_t* cluster) {
56static void clusterlist_add_preinit (
cluster_t* cluster) {
63static cluster_t* clusterlist_find_postinit(
const char* host) {
66 while (clusterlist_cursor) {
74 return (clusterlist_cursor?cluster:
NULL);
76static cluster_t* clusterlist_find_preinit(
const char* host) {
80cluster_t* (*clusterlist_find)(
const char* host) = clusterlist_find_preinit;
83static cluster_t* clusterlist_first_postinit() {
87static cluster_t* clusterlist_first_preinit() {
91cluster_t* (*clusterlist_first)() = clusterlist_first_preinit;
94static cluster_t* clusterlist_next_postinit() {
98static cluster_t* clusterlist_next_preinit() {
102cluster_t* (*clusterlist_next)() = clusterlist_next_preinit;
105static cluster_t* clusterlist_get_postinit() {
108static cluster_t* clusterlist_get_preinit() {
112cluster_t* (*clusterlist_get)() = clusterlist_get_preinit;
cluster_t *(* clusterlist_first)()
cluster_t *(* clusterlist_get)()
void(* clusterlist_add)(cluster_t *cluster)
cluster_t *(* clusterlist_next)()
cluster_t *(* clusterlist_find)(const char *host)
Self initialized cluster records list (non thread-safe)
void * sclist_getvalue(sclistrecord_t *record)
Returns the value pointer stored in the record.
sclist_t * sclist_new()
Allocate and initialize the internal list structure.
sclistrecord_t * sclist_nextrecord(const sclistrecord_t *record)
Returns the pointer on the record following the specified one.
sclistrecord_t * sclist_addrecord(sclist_t *sclist, void *value)
Add a value at the end of the list.
sclistrecord_t * sclist_firstrecord(const sclist_t *sclist)
Returns the pointer on the first list record.
Basic single chained generic list.
Private list record structure.