You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2006/04/04 08:22:11 UTC
svn commit: r391232 - in /webservices/axis2/trunk/c: include/axis2_env.h
include/axis2_thread_pool.h
modules/core/transport/http/receiver/http_svr_thread.c
modules/util/thread_pool.c
Author: samisa
Date: Mon Apr 3 23:22:10 2006
New Revision: 391232
URL: http://svn.apache.org/viewcvs?rev=391232&view=rev
Log:
axis2_init_thread_env to thread pool
Modified:
webservices/axis2/trunk/c/include/axis2_env.h
webservices/axis2/trunk/c/include/axis2_thread_pool.h
webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_svr_thread.c
webservices/axis2/trunk/c/modules/util/thread_pool.c
Modified: webservices/axis2/trunk/c/include/axis2_env.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_env.h?rev=391232&r1=391231&r2=391232&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_env.h (original)
+++ webservices/axis2/trunk/c/include/axis2_env.h Mon Apr 3 23:22:10 2006
@@ -40,11 +40,11 @@
/** @} */
- struct axis2_environment;
- struct axis2_environment_ops;
+ struct axis2_env;
+ struct axis2_env_ops;
/**
- * @defgroup axis2_environment Environment Container
+ * @defgroup axis2_env Environment Container
* @ingroup axis2_util
* @{
*/
@@ -55,7 +55,7 @@
* Environment acts as a container for error, log, memory allocator and other
* routines
*/
- typedef struct axis2_environment
+ typedef struct axis2_env
{
/** Memory allocation routines */
axis2_allocator_t *allocator;
Modified: webservices/axis2/trunk/c/include/axis2_thread_pool.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_thread_pool.h?rev=391232&r1=391231&r2=391232&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_thread_pool.h (original)
+++ webservices/axis2/trunk/c/include/axis2_thread_pool.h Mon Apr 3 23:22:10 2006
@@ -39,7 +39,7 @@
typedef struct axis2_thread_pool_ops axis2_thread_pool_ops_t;
typedef struct axis2_thread_pool axis2_thread_pool_t;
-
+struct axis2_env;
/**
* \brief Axis2 thread_pool
@@ -105,6 +105,13 @@
*/
AXIS2_DECLARE(axis2_thread_pool_t *) axis2_thread_pool_init(
axis2_allocator_t *allocator);
+
+/**
+ * This function can be used to initialize the environment in case of
+ * spawning a new thread via a thread function
+ */
+AXIS2_DECLARE (struct axis2_env *)
+axis2_init_thread_env(struct axis2_env **system_env);
#define AXIS2_THREAD_POOL_GET_THREAD(thread_pool, func, data) \
((thread_pool)->ops->get_thread(thread_pool, func, data))
Modified: webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_svr_thread.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_svr_thread.c?rev=391232&r1=391231&r2=391232&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_svr_thread.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_svr_thread.c Mon Apr 3 23:22:10 2006
@@ -268,14 +268,6 @@
}
-AXIS2_DECLARE (axis2_env_t*)
-axis2_init_thread_env(axis2_env_t **system_env)
-{
- axis2_error_t *error = axis2_error_create((*system_env)->allocator);
- return axis2_env_create_with_error_log((*system_env)->allocator, error,
- (*system_env)->log);
-}
-
/**
* Thread worker function.
*/
Modified: webservices/axis2/trunk/c/modules/util/thread_pool.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/thread_pool.c?rev=391232&r1=391231&r2=391232&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/thread_pool.c (original)
+++ webservices/axis2/trunk/c/modules/util/thread_pool.c Mon Apr 3 23:22:10 2006
@@ -15,6 +15,7 @@
*/
#include <axis2_thread_pool.h>
+#include <axis2_env.h>
/**
* @brief Stream struct impl
@@ -153,3 +154,13 @@
}
return axis2_thread_detach(thd);
}
+
+AXIS2_DECLARE (axis2_env_t *)
+axis2_init_thread_env(axis2_env_t **system_env)
+{
+ axis2_error_t *error = axis2_error_create((*system_env)->allocator);
+ return axis2_env_create_with_error_log_thread_pool((*system_env)->allocator, error,
+ (*system_env)->log, (*system_env)->thread_pool);
+}
+
+