/usr/src/redhat/BUILD/httpd-2.2.3/srclib/apr/include/arch/unix/apr_arch_inherit.h

00001 /* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
00002  * applicable.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * 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 #ifndef INHERIT_H
00018 #define INHERIT_H
00019 
00020 #include "apr_inherit.h"
00021 
00022 #define APR_INHERIT (1 << 24)    /* Must not conflict with other bits */
00023 
00024 #define APR_IMPLEMENT_INHERIT_SET(name, flag, pool, cleanup)        \
00025 apr_status_t apr_##name##_inherit_set(apr_##name##_t *the##name)    \
00026 {                                                                   \
00027     if (the##name->flag & APR_FILE_NOCLEANUP)                       \
00028         return APR_EINVAL;                                          \
00029     if (!(the##name->flag & APR_INHERIT)) {                         \
00030         the##name->flag |= APR_INHERIT;                             \
00031         apr_pool_child_cleanup_set(the##name->pool,                 \
00032                                    (void *)the##name,               \
00033                                    cleanup, apr_pool_cleanup_null); \
00034     }                                                               \
00035     return APR_SUCCESS;                                             \
00036 }
00037 
00038 #define APR_IMPLEMENT_INHERIT_UNSET(name, flag, pool, cleanup)      \
00039 apr_status_t apr_##name##_inherit_unset(apr_##name##_t *the##name)  \
00040 {                                                                   \
00041     if (the##name->flag & APR_FILE_NOCLEANUP)                       \
00042         return APR_EINVAL;                                          \
00043     if (the##name->flag & APR_INHERIT) {                            \
00044         the##name->flag &= ~APR_INHERIT;                            \
00045         apr_pool_child_cleanup_set(the##name->pool,                 \
00046                                    (void *)the##name,               \
00047                                    cleanup, cleanup);               \
00048     }                                                               \
00049     return APR_SUCCESS;                                             \
00050 }
00051 
00052 #endif  /* ! INHERIT_H */

Apacheに対してSun Jul 19 22:05:24 2009に生成されました。  doxygen 1.4.7