Author: jfrederic.clere(a)jboss.com
Date: 2008-06-03 10:59:57 -0400 (Tue, 03 Jun 2008)
New Revision: 1650
Modified:
trunk/mod_cluster/native/include/balancer.h
trunk/mod_cluster/native/include/context.h
trunk/mod_cluster/native/include/host.h
trunk/mod_cluster/native/include/mod_proxy_cluster.h
trunk/mod_cluster/native/include/node.h
trunk/mod_cluster/native/include/slotmem.h
Log:
remove the useless APR_DECLARE().
Modified: trunk/mod_cluster/native/include/balancer.h
===================================================================
--- trunk/mod_cluster/native/include/balancer.h 2008-06-03 13:19:34 UTC (rev 1649)
+++ trunk/mod_cluster/native/include/balancer.h 2008-06-03 14:59:57 UTC (rev 1650)
@@ -70,7 +70,7 @@
* @return APR_SUCCESS if all went well
*
*/
-APR_DECLARE(apr_status_t) insert_update_balancer(mem_t *s, balancerinfo_t *balancer);
+apr_status_t insert_update_balancer(mem_t *s, balancerinfo_t *balancer);
/**
* read a balancer record from the shared table
@@ -78,7 +78,7 @@
* @param balancer balancer to read from the shared table.
* @return address of the read balancer or NULL if error.
*/
-APR_DECLARE(balancerinfo_t *) read_balancer(mem_t *s, balancerinfo_t *balancer);
+balancerinfo_t * read_balancer(mem_t *s, balancerinfo_t *balancer);
/**
* get a balancer record from the shared table
@@ -86,7 +86,7 @@
* @param balancer address of the balancer read from the shared table.
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(apr_status_t) get_balancer(mem_t *s, balancerinfo_t **balancer, int ids);
+apr_status_t get_balancer(mem_t *s, balancerinfo_t **balancer, int ids);
/**
* remove(free) a balancer record from the shared table
@@ -94,7 +94,7 @@
* @param balancer balancer to remove from the shared table.
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(apr_status_t) remove_balancer(mem_t *s, balancerinfo_t *balancer);
+apr_status_t remove_balancer(mem_t *s, balancerinfo_t *balancer);
/*
* get the ids for the used (not free) balancers in the table
@@ -102,14 +102,14 @@
* @param ids array of int to store the used id (must be big enough).
* @return number of balancer existing or -1 if error.
*/
-APR_DECLARE(int) get_ids_used_balancer(mem_t *s, int *ids);
+int get_ids_used_balancer(mem_t *s, int *ids);
/*
* get the size of the table (max size).
* @param pointer to the shared table.
* @return size of the existing table or -1 if error.
*/
-APR_DECLARE(int) get_max_size_balancer(mem_t *s);
+int get_max_size_balancer(mem_t *s);
/**
* attach to the shared balancer table
@@ -118,7 +118,7 @@
* @param p pool to use for allocations.
* @return address of struct used to access the table.
*/
-APR_DECLARE(mem_t *) get_mem_balancer(char *string, int *num, apr_pool_t *p,
slotmem_storage_method *storage);
+mem_t * get_mem_balancer(char *string, int *num, apr_pool_t *p, slotmem_storage_method
*storage);
/**
* create a shared balancer table
* @param name to use to create the table.
@@ -126,7 +126,7 @@
* @param p pool to use for allocations.
* @return address of struct used to access the table.
*/
-APR_DECLARE(mem_t *) create_mem_balancer(char *string, int *num, apr_pool_t *p,
slotmem_storage_method *storage);
+mem_t * create_mem_balancer(char *string, int *num, apr_pool_t *p, slotmem_storage_method
*storage);
/**
* provider for the mod_proxy_cluster or mod_jk modules.
@@ -138,16 +138,16 @@
* @param balancer address of pointer to return the balancer.
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(apr_status_t) (* read_balancer)(int ids, balancerinfo_t **balancer);
+apr_status_t (* read_balancer)(int ids, balancerinfo_t **balancer);
/**
* read the list of ident of used balancers.
* @param ids address to store the idents.
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(int) (* get_ids_used_balancer)(int *ids);
+int (* get_ids_used_balancer)(int *ids);
/**
* read the max number of balancers in the shared table
*/
-APR_DECLARE(int) (*get_max_size_balancer)();
+int (*get_max_size_balancer)();
};
#endif /*BALANCER_H*/
Modified: trunk/mod_cluster/native/include/context.h
===================================================================
--- trunk/mod_cluster/native/include/context.h 2008-06-03 13:19:34 UTC (rev 1649)
+++ trunk/mod_cluster/native/include/context.h 2008-06-03 14:59:57 UTC (rev 1650)
@@ -72,7 +72,7 @@
* @return APR_SUCCESS if all went well
*
*/
-APR_DECLARE(apr_status_t) insert_update_context(mem_t *s, contextinfo_t *context);
+apr_status_t insert_update_context(mem_t *s, contextinfo_t *context);
/**
* read a context record from the shared table
@@ -80,7 +80,7 @@
* @param context context to read from the shared table.
* @return address of the read context or NULL if error.
*/
-APR_DECLARE(contextinfo_t *) read_context(mem_t *s, contextinfo_t *context);
+contextinfo_t * read_context(mem_t *s, contextinfo_t *context);
/**
* get a context record from the shared table
@@ -88,7 +88,7 @@
* @param context address of the context read from the shared table.
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(apr_status_t) get_context(mem_t *s, contextinfo_t **context, int ids);
+apr_status_t get_context(mem_t *s, contextinfo_t **context, int ids);
/**
* remove(free) a context record from the shared table
@@ -96,7 +96,7 @@
* @param context context to remove from the shared table.
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(apr_status_t) remove_context(mem_t *s, contextinfo_t *context);
+apr_status_t remove_context(mem_t *s, contextinfo_t *context);
/*
* get the ids for the used (not free) contexts in the table
@@ -104,14 +104,14 @@
* @param ids array of int to store the used id (must be big enough).
* @return number of context existing or -1 if error.
*/
-APR_DECLARE(int) get_ids_used_context(mem_t *s, int *ids);
+int get_ids_used_context(mem_t *s, int *ids);
/*
* get the size of the table (max size).
* @param pointer to the shared table.
* @return size of the existing table or -1 if error.
*/
-APR_DECLARE(int) get_max_size_context(mem_t *s);
+int get_max_size_context(mem_t *s);
/**
* attach to the shared context table
@@ -120,7 +120,7 @@
* @param p pool to use for allocations.
* @return address of struct used to access the table.
*/
-APR_DECLARE(mem_t *) get_mem_context(char *string, int *num, apr_pool_t *p,
slotmem_storage_method *storage);
+mem_t * get_mem_context(char *string, int *num, apr_pool_t *p, slotmem_storage_method
*storage);
/**
* create a shared context table
* @param name to use to create the table.
@@ -128,7 +128,7 @@
* @param p pool to use for allocations.
* @return address of struct used to access the table.
*/
-APR_DECLARE(mem_t *) create_mem_context(char *string, int *num, apr_pool_t *p,
slotmem_storage_method *storage);
+mem_t * create_mem_context(char *string, int *num, apr_pool_t *p, slotmem_storage_method
*storage);
/**
* provider for the mod_proxy_cluster or mod_jk modules.
@@ -140,16 +140,16 @@
* @param context address of pointer to return the context.
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(apr_status_t) (* read_context)(int ids, contextinfo_t **context);
+apr_status_t (* read_context)(int ids, contextinfo_t **context);
/**
* read the list of ident of used contexts.
* @param ids address to store the idents.
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(int) (* get_ids_used_context)(int *ids);
+int (* get_ids_used_context)(int *ids);
/**
* read the max number of contexts in the shared table
*/
-APR_DECLARE(int) (*get_max_size_context)();
+int (*get_max_size_context)();
};
#endif /*CONTEXT_H*/
Modified: trunk/mod_cluster/native/include/host.h
===================================================================
--- trunk/mod_cluster/native/include/host.h 2008-06-03 13:19:34 UTC (rev 1649)
+++ trunk/mod_cluster/native/include/host.h 2008-06-03 14:59:57 UTC (rev 1650)
@@ -65,7 +65,7 @@
* @return APR_SUCCESS if all went well
*
*/
-APR_DECLARE(apr_status_t) insert_update_host(mem_t *s, hostinfo_t *host);
+apr_status_t insert_update_host(mem_t *s, hostinfo_t *host);
/**
* read a host record from the shared table
@@ -73,7 +73,7 @@
* @param host host to read from the shared table.
* @return address of the read host or NULL if error.
*/
-APR_DECLARE(hostinfo_t *) read_host(mem_t *s, hostinfo_t *host);
+hostinfo_t * read_host(mem_t *s, hostinfo_t *host);
/**
* get a host record from the shared table
@@ -81,7 +81,7 @@
* @param host address of the host read from the shared table.
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(apr_status_t) get_host(mem_t *s, hostinfo_t **host, int ids);
+apr_status_t get_host(mem_t *s, hostinfo_t **host, int ids);
/**
* remove(free) a host record from the shared table
@@ -89,7 +89,7 @@
* @param host host to remove from the shared table.
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(apr_status_t) remove_host(mem_t *s, hostinfo_t *host);
+apr_status_t remove_host(mem_t *s, hostinfo_t *host);
/*
* get the ids for the used (not free) hosts in the table
@@ -97,14 +97,14 @@
* @param ids array of int to store the used id (must be big enough).
* @return number of host existing or -1 if error.
*/
-APR_DECLARE(int) get_ids_used_host(mem_t *s, int *ids);
+int get_ids_used_host(mem_t *s, int *ids);
/*
* get the size of the table (max size).
* @param pointer to the shared table.
* @return size of the existing table or -1 if error.
*/
-APR_DECLARE(int) get_max_size_host(mem_t *s);
+int get_max_size_host(mem_t *s);
/**
* attach to the shared host table
@@ -113,7 +113,7 @@
* @param p pool to use for allocations.
* @return address of struct used to access the table.
*/
-APR_DECLARE(mem_t *) get_mem_host(char *string, int *num, apr_pool_t *p,
slotmem_storage_method *storage);
+mem_t * get_mem_host(char *string, int *num, apr_pool_t *p, slotmem_storage_method
*storage);
/**
* create a shared host table
* @param name to use to create the table.
@@ -121,7 +121,7 @@
* @param p pool to use for allocations.
* @return address of struct used to access the table.
*/
-APR_DECLARE(mem_t *) create_mem_host(char *string, int *num, apr_pool_t *p,
slotmem_storage_method *storage);
+mem_t * create_mem_host(char *string, int *num, apr_pool_t *p, slotmem_storage_method
*storage);
/**
* provider for the mod_proxy_cluster or mod_jk modules.
@@ -133,16 +133,16 @@
* @param host address of pointer to return the host.
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(apr_status_t) (* read_host)(int ids, hostinfo_t **host);
+apr_status_t (* read_host)(int ids, hostinfo_t **host);
/**
* read the list of ident of used hosts.
* @param ids address to store the idents.
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(int) (* get_ids_used_host)(int *ids);
+int (* get_ids_used_host)(int *ids);
/**
* read the max number of hosts in the shared table
*/
-APR_DECLARE(int) (*get_max_size_host)();
+int (*get_max_size_host)();
};
#endif /*HOST_H*/
Modified: trunk/mod_cluster/native/include/mod_proxy_cluster.h
===================================================================
--- trunk/mod_cluster/native/include/mod_proxy_cluster.h 2008-06-03 13:19:34 UTC (rev
1649)
+++ trunk/mod_cluster/native/include/mod_proxy_cluster.h 2008-06-03 14:59:57 UTC (rev
1650)
@@ -36,7 +36,7 @@
* @param scheme AJP/http/https protocol to use.
* @return 0: All OK 500 : Error
*/
-APR_DECLARE(int) (* proxy_node_isup)(request_rec *r, int id, char *scheme, int load);
+int (* proxy_node_isup)(request_rec *r, int id, char *scheme, int load);
};
typedef struct balancer_method balancer_method;
#endif /*MOD_PROXY_CLUSTER_H*/
Modified: trunk/mod_cluster/native/include/node.h
===================================================================
--- trunk/mod_cluster/native/include/node.h 2008-06-03 13:19:34 UTC (rev 1649)
+++ trunk/mod_cluster/native/include/node.h 2008-06-03 14:59:57 UTC (rev 1650)
@@ -91,7 +91,7 @@
* @return APR_SUCCESS if all went well
*
*/
-APR_DECLARE(apr_status_t) insert_update_node(mem_t *s, nodeinfo_t *node, int *id);
+apr_status_t insert_update_node(mem_t *s, nodeinfo_t *node, int *id);
/**
* read a node record from the shared table
@@ -99,7 +99,7 @@
* @param node node to read from the shared table.
* @return address of the read node or NULL if error.
*/
-APR_DECLARE(nodeinfo_t *) read_node(mem_t *s, nodeinfo_t *node);
+nodeinfo_t * read_node(mem_t *s, nodeinfo_t *node);
/**
* get a node record from the shared table
@@ -107,7 +107,7 @@
* @param node address of the node read from the shared table.
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(apr_status_t) get_node(mem_t *s, nodeinfo_t **node, int ids);
+apr_status_t get_node(mem_t *s, nodeinfo_t **node, int ids);
/**
* remove(free) a node record from the shared table
@@ -115,7 +115,7 @@
* @param node node to remove from the shared table.
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(apr_status_t) remove_node(mem_t *s, nodeinfo_t *node);
+apr_status_t remove_node(mem_t *s, nodeinfo_t *node);
/*
* get the ids for the used (not free) nodes in the table
@@ -123,14 +123,14 @@
* @param ids array of int to store the used id (must be big enough).
* @return number of node existing or -1 if error.
*/
-APR_DECLARE(int) get_ids_used_node(mem_t *s, int *ids);
+int get_ids_used_node(mem_t *s, int *ids);
/*
* get the size of the table (max size).
* @param pointer to the shared table.
* @return size of the existing table or -1 if error.
*/
-APR_DECLARE(int) get_max_size_node(mem_t *s);
+int get_max_size_node(mem_t *s);
/**
* attach to the shared node table
@@ -139,7 +139,7 @@
* @param p pool to use for allocations.
* @return address of struct used to access the table.
*/
-APR_DECLARE(mem_t *) get_mem_node(char *string, int *num, apr_pool_t *p,
slotmem_storage_method *storage);
+mem_t * get_mem_node(char *string, int *num, apr_pool_t *p, slotmem_storage_method
*storage);
/**
* create a shared node table
* @param name to use to create the table.
@@ -147,7 +147,7 @@
* @param p pool to use for allocations.
* @return address of struct used to access the table.
*/
-APR_DECLARE(mem_t *) create_mem_node(char *string, int *num, apr_pool_t *p,
slotmem_storage_method *storage);
+mem_t * create_mem_node(char *string, int *num, apr_pool_t *p, slotmem_storage_method
*storage);
/**
* provider for the mod_proxy_cluster or mod_jk modules.
@@ -159,29 +159,29 @@
* @param node address of pointer to return the node.
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(apr_status_t) (* read_node)(int ids, nodeinfo_t **node);
+apr_status_t (* read_node)(int ids, nodeinfo_t **node);
/**
* read the list of ident of used nodes.
* @param ids address to store the idents.
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(int) (* get_ids_used_node)(int *ids);
+int (* get_ids_used_node)(int *ids);
/**
* read the max number of nodes in the shared table
*/
-APR_DECLARE(int) (*get_max_size_node)();
+int (*get_max_size_node)();
/**
* check the nodes for modifications.
* XXX: void *data is server_rec *s in fact.
*/
-APR_DECLARE(apr_time_t) (*worker_nodes_need_update)(void *data, apr_pool_t *pool);
+apr_time_t (*worker_nodes_need_update)(void *data, apr_pool_t *pool);
/*
* mark that the worker node are now up to date.
*/
-APR_DECLARE(int) (*worker_nodes_are_updated)(void *data);
+int (*worker_nodes_are_updated)(void *data);
/*
* Remove the node from shared memory (free the slotmem)
*/
-APR_DECLARE(int) (*remove_node)(nodeinfo_t *node);
+int (*remove_node)(nodeinfo_t *node);
};
#endif /*NODE_H*/
Modified: trunk/mod_cluster/native/include/slotmem.h
===================================================================
--- trunk/mod_cluster/native/include/slotmem.h 2008-06-03 13:19:34 UTC (rev 1649)
+++ trunk/mod_cluster/native/include/slotmem.h 2008-06-03 14:59:57 UTC (rev 1650)
@@ -67,7 +67,7 @@
* @param pool is pool used to create scoreboard
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(apr_status_t) (* ap_slotmem_do)(ap_slotmem_t *s, ap_slotmem_callback_fn_t
*func, void *data, apr_pool_t *pool);
+apr_status_t (* ap_slotmem_do)(ap_slotmem_t *s, ap_slotmem_callback_fn_t *func, void
*data, apr_pool_t *pool);
/**
* create a new slotmem with each item size is item_size.
@@ -79,7 +79,7 @@
* @param pool is pool used to create scoreboard
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(apr_status_t) (* ap_slotmem_create)(ap_slotmem_t **new, const char *name,
apr_size_t item_size, int item_num, apr_pool_t *pool);
+apr_status_t (* ap_slotmem_create)(ap_slotmem_t **new, const char *name, apr_size_t
item_size, int item_num, apr_pool_t *pool);
/**
* attach to an existing slotmem.
@@ -91,7 +91,7 @@
* @param pool is pool to memory allocate.
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(apr_status_t) (* ap_slotmem_attach)(ap_slotmem_t **new, const char *name,
apr_size_t *item_size, int *item_num, apr_pool_t *pool);
+apr_status_t (* ap_slotmem_attach)(ap_slotmem_t **new, const char *name, apr_size_t
*item_size, int *item_num, apr_pool_t *pool);
/**
* get the memory associated with this worker slot.
* @param s ap_slotmem_t to use.
@@ -99,7 +99,7 @@
* @param mem address to store the pointer to the slot
* @return APR_SUCCESS if all went well (the slot must be an allocated slot).
*/
-APR_DECLARE(apr_status_t) (* ap_slotmem_mem)(ap_slotmem_t *s, int item_id, void**mem);
+apr_status_t (* ap_slotmem_mem)(ap_slotmem_t *s, int item_id, void**mem);
/**
* alloc a slot from the slotmem free idems.
* @param s ap_slotmem_t to use.
@@ -107,7 +107,7 @@
* @param mem address to store the pointer to the slot
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(apr_status_t) (* ap_slotmem_alloc)(ap_slotmem_t *s, int *item_id, void**mem);
+apr_status_t (* ap_slotmem_alloc)(ap_slotmem_t *s, int *item_id, void**mem);
/**
* free a slot (return it to the free list).
* @param s ap_slotmem_t to use.
@@ -115,32 +115,32 @@
* @param mem pointer to the slot
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(apr_status_t) (* ap_slotmem_free)(ap_slotmem_t *s, int item_id, void*mem);
+apr_status_t (* ap_slotmem_free)(ap_slotmem_t *s, int item_id, void*mem);
/**
* Lock the slotmem.
* @param s ap_slotmem_t to use.
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(apr_status_t) (* ap_slotmem_lock)(ap_slotmem_t *s);
+apr_status_t (* ap_slotmem_lock)(ap_slotmem_t *s);
/**
* Unlock the slotmem.
* @param s ap_slotmem_t to use.
* @return APR_SUCCESS if all went well
*/
-APR_DECLARE(apr_status_t) (* ap_slotmem_unlock)(ap_slotmem_t *s);
+apr_status_t (* ap_slotmem_unlock)(ap_slotmem_t *s);
/**
* Return the used id in the slotmem table.
* @param s ap_slotmem_t to use.
* @param ids array of int where to store the free idents.
* @return number of slotmem in use.
*/
-APR_DECLARE(int) (*ap_slotmem_get_used)(ap_slotmem_t *s, int *ids);
+int (*ap_slotmem_get_used)(ap_slotmem_t *s, int *ids);
/**
* Return the size of the slotmem table.
* @param s ap_slotmem_t to use.
* @return number of slotmem that cant be stored in the slotmem table.
*/
-APR_DECLARE(int) (*ap_slotmem_get_max_size)(ap_slotmem_t *s);
+int (*ap_slotmem_get_max_size)(ap_slotmem_t *s);
};
typedef struct slotmem_storage_method slotmem_storage_method;