Where Online Learning is simpler!
The C and C++ Include Header Files
/usr/include/apache2/modperl_global.h
$ cat -n /usr/include/apache2/modperl_global.h 1 /* Licensed to the Apache Software Foundation (ASF) under one or more 2 * contributor license agreements. See the NOTICE file distributed with 3 * this work for additional information regarding copyright ownership. 4 * The ASF licenses this file to You under the Apache License, Version 2.0 5 * (the "License"); you may not use this file except in compliance with 6 * the License. You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef MODPERL_GLOBAL_H 18 #define MODPERL_GLOBAL_H 19 20 typedef struct { 21 #if MP_THREADED 22 perl_mutex glock; 23 #endif 24 int flags; 25 void *data; 26 const char *name; 27 } modperl_global_t; 28 29 #if MP_THREADED 30 typedef apr_threadkey_t modperl_tls_t; 31 #else 32 typedef modperl_global_t modperl_tls_t; 33 #endif 34 35 void modperl_global_request_cfg_set(request_rec *r); 36 37 request_rec *modperl_global_request(pTHX_ SV *svr); 38 39 void modperl_global_request_set(request_rec *r); 40 41 void modperl_global_request_obj_set(pTHX_ SV *svr); 42 43 void modperl_global_init(modperl_global_t *global, apr_pool_t *p, 44 void *data, const char *name); 45 46 void modperl_global_lock(modperl_global_t *global); 47 48 void modperl_global_unlock(modperl_global_t *global); 49 50 void *modperl_global_get(modperl_global_t *global); 51 52 void modperl_global_set(modperl_global_t *global, void *data); 53 54 #define MP_GLOBAL_DECL(gname, type) \ 55 void modperl_global_init_##gname(apr_pool_t *p, type gname); \ 56 void modperl_global_lock_##gname(void); \ 57 void modperl_global_unlock_##gname(void); \ 58 type modperl_global_get_##gname(void); \ 59 void modperl_global_set_##gname(void *) 60 61 /* modperl_global_get_pconf returns a thread un-safe object */ 62 MP_GLOBAL_DECL(pconf, apr_pool_t *); 63 64 /* modperl_global_get_server_rec returns a thread un-safe object */ 65 MP_GLOBAL_DECL(server_rec, server_rec *); 66 67 void modperl_global_anon_cnt_init(apr_pool_t *p); 68 int modperl_global_anon_cnt_next(void); 69 70 apr_status_t modperl_tls_create(apr_pool_t *p, modperl_tls_t **key); 71 apr_status_t modperl_tls_get(modperl_tls_t *key, void **data); 72 apr_status_t modperl_tls_set(modperl_tls_t *key, void *data); 73 void modperl_tls_reset_cleanup(apr_pool_t *p, modperl_tls_t *key, void *data); 74 75 #define MP_TLS_DECL(gname, type) \ 76 apr_status_t modperl_tls_create_##gname(apr_pool_t *p); \ 77 apr_status_t modperl_tls_get_##gname(type *data); \ 78 apr_status_t modperl_tls_set_##gname(void *data); \ 79 void modperl_tls_reset_cleanup_##gname(apr_pool_t *p, type data) 80 81 MP_TLS_DECL(request_rec, request_rec *); 82 83 #endif /* MODPERL_GLOBAL_H */ 84 85 /* 86 * Local Variables: 87 * c-basic-offset: 4 88 * indent-tabs-mode: nil 89 * End: 90 */
Contact us
|
About us
|
Term of use
|
Copyright © 2000-2025 MyWebUniversity.com ™