GME  13
apr_arch_threadproc.h
Go to the documentation of this file.
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
00002  * contributor license agreements.  See the NOTICE file distributed with
00003  * this work for additional information regarding copyright ownership.
00004  * The ASF licenses this file to You under the Apache License, Version 2.0
00005  * (the "License"); you may not use this file except in compliance with
00006  * the License.  You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #include "apr_thread_proc.h"
00018 #include "apr_file_io.h"
00019 
00020 #ifndef THREAD_PROC_H
00021 #define THREAD_PROC_H
00022 
00023 #define APR_THREADATTR_DETACHED 1
00024 
00025 #define SHELL_PATH "cmd.exe"
00026 #define APR_THREAD_STACKSIZE 65536
00027 
00028 struct apr_threadattr_t {
00029     apr_pool_t *pool;
00030     unsigned long attr;
00031     apr_size_t stacksize;
00032 };
00033 
00034 struct apr_thread_t {
00035     apr_pool_t *pool;
00036     struct apr_threadattr_t *attr;
00037     unsigned long tid;
00038     apr_thread_start_t func;
00039     void *data;
00040     apr_status_t exitval;
00041 };
00042 
00043 struct apr_threadkey_t {
00044     apr_pool_t *pool;
00045     unsigned long *key;
00046 };
00047 
00048 struct apr_procattr_t {
00049     apr_pool_t *pool;
00050     apr_file_t *parent_in;
00051     apr_file_t *child_in;
00052     apr_file_t *parent_out;
00053     apr_file_t *child_out;
00054     apr_file_t *parent_err;
00055     apr_file_t *child_err;
00056     char *currdir;
00057     apr_int32_t cmdtype;
00058     apr_int32_t detached;
00059 };
00060 
00061 struct apr_thread_once_t {
00062     unsigned long sem;
00063     char hit;
00064 };
00065 
00066 #endif  /* ! THREAD_PROC_H */
00067