Changeset 657 for trunk/kernel/libk/grdxt.h
- Timestamp:
- Mar 18, 2020, 11:16:59 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/grdxt.h
r656 r657 2 2 * grdxt.h - Three-levels Generic Radix-tree definition. 3 3 * 4 * Authors Alain Greiner (2016,2017,2018,2019 )4 * Authors Alain Greiner (2016,2017,2018,2019,2019) 5 5 * 6 6 * Copyright UPMC Sorbonne Universites … … 124 124 /******************************************************************************************* 125 125 * This function scan all radix-tree entries in increasing key order, starting from 126 * the value defined by the <start_key> argument, and returna pointer on the first valid127 * registered item, and the found item key value.126 * the key defined by the <start_key> argument. It returns a pointer on the first valid 127 * registered item, and returns in the <found_key> buffer the found item key value. 128 128 * It must be called by a local thread. 129 129 ******************************************************************************************* … … 142 142 143 143 /******************************************************************************************* 144 * This function initialises the radix-tree descriptor, 145 * and allocates memory for the first level array of pointers. 146 * It can be called by any thread running in any cluster 147 ******************************************************************************************* 148 * @ rt_xp : extended pointer on the radix-tree descriptor. 149 * @ ix1_width : number of bits in ix1 field 150 * @ ix2_width : number of bits in ix2 field 151 * @ ix3_width : number of bits in ix3 field 152 * @ returns 0 if success / returns ENOMEM if no more memory. 153 ******************************************************************************************/ 154 error_t grdxt_remote_init( xptr_t rt_xp, 155 uint32_t ix1_width, 156 uint32_t ix2_width, 157 uint32_t ix3_width ); 158 159 /******************************************************************************************* 160 * This function releases all memory allocated to the radix-tree infrastructure. 161 * A warning message is printed on the kernel TXT0 if the radix tree is not empty. 162 * It can be called by any thread running in any cluster 163 ******************************************************************************************* 164 * @ rt_xp : extended pointer on the radix-tree descriptor. 165 ******************************************************************************************/ 166 void grdxt_remote_destroy( xptr_t rt_xp ); 167 168 /******************************************************************************************* 144 169 * This function insert a new item in a - possibly remote - radix tree. 145 170 * It dynamically allocates memory for new second and third level arrays if required. 171 * It can be called by any thread running in any cluster 146 172 ******************************************************************************************* 147 173 * @ rt_xp : extended pointer on the radix-tree descriptor. … … 157 183 * This function removes an item identified by its key from a - possibly remote - radix 158 184 * tree, and returns a local pointer on the removed item. No memory is released. 185 * It can be called by a thread running in any cluster 159 186 ******************************************************************************************* 160 187 * @ rt_xp : pointer on the radix-tree descriptor. 161 188 * @ key : key value. 162 * @ returns local pointer on removed item if success / returnsNULL if failure.163 ******************************************************************************************/ 164 void *grdxt_remote_remove( xptr_t rt_xp,189 * @ returns extended pointer on removed item if success / returns XPTR_NULL if failure. 190 ******************************************************************************************/ 191 xptr_t grdxt_remote_remove( xptr_t rt_xp, 165 192 uint32_t key ); 166 193 … … 169 196 * on the item identified by the <key> argument, from the radix tree identified by 170 197 * the <rt_xp> remote pointer. 198 * It can be called by a thread running in any cluster 171 199 ******************************************************************************************* 172 200 * @ rt_xp : extended pointer on the radix-tree descriptor. 173 201 * @ key : key value. 174 * @ returns an extended pointer on found item if success / returns XPTR_NULL if failure.202 * @ returns extended pointer on found item if success / returns XPTR_NULL if not found. 175 203 ******************************************************************************************/ 176 204 xptr_t grdxt_remote_lookup( xptr_t rt_xp, … … 178 206 179 207 /******************************************************************************************* 208 * This function scan all radix-tree entries of a - possibly remote - radix tree <rt_xp>, 209 * in increasing key order, starting from the key defined by the <start_key> argument. 210 * It returns an extended pointer on the first valid registered item, and returns in the 211 * <found_key> buffer the found item key value. 212 * It can be called by a thread running in any cluster 213 ******************************************************************************************* 214 * @ rt_xp : extended pointer on the radix-tree descriptor. 215 * @ start_key : key starting value for the scan. 216 * @ found_key : [out] buffer for found key value. 217 * @ return xptr on first valid item if found / return XPTR_NULL if no item found. 218 ******************************************************************************************/ 219 xptr_t grdxt_remote_get_first( xptr_t rt_xp, 220 uint32_t start_key, 221 uint32_t * found_key ); 222 223 /******************************************************************************************* 180 224 * This function displays the current content of a possibly remote radix_tree. 225 * It can be called by a thread running in any cluster 181 226 ******************************************************************************************* 182 227 * @ rt : extended pointer on the radix-tree descriptor.
Note: See TracChangeset
for help on using the changeset viewer.