Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
afw_pool_internal.h
1 // See the 'COPYING' file in the project root for licensing information.
2 /*
3  * Adaptive Framework memory pool internal header.
4  *
5  * Copyright (c) 2010-2023 Clemson University
6  *
7  */
8 
9 #ifndef __AFW_POOL_INTERNAL_H__
10 #define __AFW_POOL_INTERNAL_H__
11 
12 #include "afw_interface.h"
13 
29 
32 
33 
35 
36  afw_pool_t pub;
37 
39  apr_pool_t *apr_p;
40 
42  const afw_utf8_t *name;
43 
46 
47  /* @brief First subpool of this pool. */
48  afw_pool_internal_multithreaded_self_t * AFW_ATOMIC first_child;
49 
50  /* @brief Next sibling of this pool. */
51  afw_pool_internal_multithreaded_self_t * AFW_ATOMIC next_sibling;
52 
60 
63 
66 
69 
70 };
71 
72 
75 
76 
78 
79  afw_pool_t pub;
80 
82  apr_pool_t *apr_p;
83 
85  const afw_utf8_t *name;
86 
89 
90  /* @brief First subpool of this pool. */
92 
93  /* @brief Next sibling of this pool. */
95 
103 
111 
114 
117 
120 
121 };
122 
123 
131 AFW_DECLARE(const afw_pool_t *)
132 afw_pool_internal_create_base_pool();
133 
134 
145 afw_pool_internal_create_thread(
146  afw_size_t size,
147  afw_xctx_t *xctx);
148 
149 
162 afw_pool_internal_create_thread_debug(
163  afw_size_t size,
164  afw_xctx_t *xctx,
165  const afw_utf8_z_t *source_z);
166 
167 
168 #ifdef AFW_POOL_DEBUG
169 #define afw_pool_internal_create_thread(size,xctx) \
170  afw_pool_internal_create_thread_debug(size, xctx, AFW__FILE_LINE__)
171 #endif
172 
173 AFW_END_DECLARES
174 
177 #endif /* __AFW_POOL_INTERNAL_H__ */
#define AFW_BEGIN_DECLARES
#define AFW_DECLARE(type)
Declare a public afw function.
Interfaceafw_interface header.
afw_utf8_octet_t afw_utf8_z_t
NFC normalized UTF-8 null terminated string.
Definition: afw_common.h:523
apr_size_t afw_size_t
size_t.
Definition: afw_common.h:151
apr_int64_t afw_integer_t
typedef for big signed int.
Definition: afw_common.h:321
Struct for registered cleanup functions.
Definition: afw_pool.h:35
apr_pool_t * apr_p
Associated apr pool or NULL if it has not been created.
afw_pool_cleanup_t * first_cleanup
First cleanup function.
afw_integer_t pool_number
Unique number for pool.
afw_pool_internal_multithreaded_self_t * parent
Parent pool of this pool.
AFW_ATOMIC afw_size_t bytes_allocated
Bytes allocated via afw_pool_malloc()/afw_pool_calloc().
AFW_ATOMIC afw_integer_t reference_count
Pools reference count.
const afw_utf8_t * name
Optional pool name.
afw_size_t bytes_allocated
Bytes allocated via afw_pool_malloc()/afw_pool_calloc().
apr_pool_t * apr_p
Associated apr pool or NULL if it has not been created.
afw_pool_cleanup_t * first_cleanup
First cleanup function.
afw_integer_t pool_number
Unique number for pool.
afw_pool_internal_singlethreaded_self_t * parent
Parent pool of this pool.
const afw_utf8_t * name
Optional pool name.
afw_integer_t reference_count
Pools reference count.
const afw_thread_t * thread
Thread associated with a thread specific pool.
Interface afw_pool public struct.
Struct for public part of afw_pool_t.
Definition: afw_thread.h:56
NFC normalized UTF-8 string.
Definition: afw_common.h:545
Interface afw_xctx public struct.