Changeset 09ab0a9a in mainline for kernel/generic/src/adt
- Timestamp:
- 2018-09-13T12:05:53Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cc74cb5
- Parents:
- b2aaaa0
- git-author:
- Jiri Svoboda <jiri@…> (2018-09-13 07:09:46)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-09-13 12:05:53)
- Location:
- kernel/generic/src/adt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/adt/avl.c
rb2aaaa0 r09ab0a9a 81 81 return NULL; 82 82 } 83 84 83 85 84 /** Find the node with the smallest key in an AVL tree. … … 660 659 } 661 660 662 663 661 /** Delete a node with the smallest key from the AVL tree. 664 662 * … … 730 728 /** @} 731 729 */ 732 -
kernel/generic/src/adt/cht.c
rb2aaaa0 r09ab0a9a 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 29 28 30 29 /** @addtogroup genericadt … … 287 286 */ 288 287 289 290 288 #include <adt/cht.h> 291 289 #include <adt/hash.h> … … 396 394 } wnd_t; 397 395 398 399 396 /* Sentinel node used by all buckets. Stores the greatest possible hash value.*/ 400 397 static const cht_link_t sentinel = { … … 403 400 .hash = -1 404 401 }; 405 406 402 407 403 static size_t size_to_order(size_t bucket_cnt, size_t min_order); … … 1683 1679 } 1684 1680 1685 1686 1681 #if 0 1687 1682 static void move_head(marked_ptr_t *psrc_head, marked_ptr_t *pdest_head) … … 2710 2705 } 2711 2706 2712 2713 2707 /** @} 2714 2708 */ -
kernel/generic/src/adt/hash_table.c
rb2aaaa0 r09ab0a9a 60 60 #define HT_MAX_LOAD 2 61 61 62 63 62 static size_t round_up_size(size_t); 64 63 static bool alloc_table(size_t, list_t **); … … 73 72 /* no-op */ 74 73 } 75 76 74 77 75 /** Create chained hash table. … … 205 203 } 206 204 207 208 205 /** Insert item into a hash table if not already present. 209 206 * … … 412 409 } 413 410 414 415 411 /** Shrinks the table if the table is only sparely populated. */ 416 412 static inline void shrink_if_needed(hash_table_t *h) … … 472 468 } 473 469 474 475 470 /** @} 476 471 */
Note:
See TracChangeset
for help on using the changeset viewer.
