Return-Path: Delivered-To: apmail-ws-axis-cvs-archive@www.apache.org Received: (qmail 82591 invoked from network); 4 Apr 2006 06:22:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Apr 2006 06:22:36 -0000 Received: (qmail 26115 invoked by uid 500); 4 Apr 2006 06:22:34 -0000 Delivered-To: apmail-ws-axis-cvs-archive@ws.apache.org Received: (qmail 25871 invoked by uid 500); 4 Apr 2006 06:22:33 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 25860 invoked by uid 500); 4 Apr 2006 06:22:33 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 25857 invoked by uid 99); 4 Apr 2006 06:22:33 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Apr 2006 23:22:33 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 03 Apr 2006 23:22:32 -0700 Received: (qmail 82283 invoked by uid 65534); 4 Apr 2006 06:22:12 -0000 Message-ID: <20060404062212.82282.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: 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 Date: Tue, 04 Apr 2006 06:22:11 -0000 To: axis2-cvs@ws.apache.org From: samisa@apache.org X-Mailer: svnmailer-1.0.7 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 +#include /** * @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); +} + +