axutil_thread_pool.h

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  *      http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #ifndef AXUTIL_THREAD_POOL_H
00019 #define AXUTIL_THREAD_POOL_H
00020 
00026 #include <axutil_utils_defines.h>
00027 #include <axutil_allocator.h>
00028 #include <axutil_thread.h>
00029 
00030 #ifdef __cplusplus
00031 extern "C"
00032 {
00033 #endif
00034 
00041     typedef struct axutil_thread_pool axutil_thread_pool_t;
00042     struct axutil_env;
00043 
00050     AXIS2_EXTERN axutil_thread_t *AXIS2_CALL
00051     axutil_thread_pool_get_thread(axutil_thread_pool_t *pool,
00052             axutil_thread_start_t func,
00053             void *data);
00059     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00060     axutil_thread_pool_join_thread(axutil_thread_pool_t *pool,
00061             axutil_thread_t *thd);
00062 
00068     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00069     axutil_thread_pool_exit_thread(axutil_thread_pool_t *pool,
00070             axutil_thread_t *thd);
00071     
00077     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00078     axutil_thread_pool_thread_detach(axutil_thread_pool_t *pool,
00079             axutil_thread_t *thd);
00080 
00085     AXIS2_EXTERN void AXIS2_CALL
00086     axutil_thread_pool_free(axutil_thread_pool_t *pool);
00087 
00093     AXIS2_EXTERN axutil_thread_pool_t * AXIS2_CALL 
00094     axutil_thread_pool_init(axutil_allocator_t *allocator);
00095 
00100     AXIS2_EXTERN struct axutil_env * AXIS2_CALL
00101     axutil_init_thread_env(const struct axutil_env *system_env);
00102 
00107     AXIS2_EXTERN void AXIS2_CALL
00108     axutil_free_thread_env(struct axutil_env *thread_env);
00109 
00112 #ifdef __cplusplus
00113 }
00114 #endif
00115 
00116 #endif    /* AXIS2_THREAD_POOL_H */

Generated on Thu May 3 12:31:01 2007 for Axis2/C by  doxygen 1.4.6