diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-03-14 19:02:30 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-03-14 19:02:30 +0300 |
commit | 979108f0ef30ad8053946c47d52f80efd06c2fee (patch) | |
tree | 11242efa6beed73d7f4afa99dab9f60b8e8cb559 /src/nxt_rbtree.h | |
parent | aa047be6b95aa1694c84f326ef78775f97283cb7 (diff) | |
download | unit-979108f0ef30ad8053946c47d52f80efd06c2fee.tar.gz unit-979108f0ef30ad8053946c47d52f80efd06c2fee.tar.bz2 |
Importing memory cache pool changes from nJScript.
Diffstat (limited to 'src/nxt_rbtree.h')
-rw-r--r-- | src/nxt_rbtree.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nxt_rbtree.h b/src/nxt_rbtree.h index 0f2e2fb1..4bf479ea 100644 --- a/src/nxt_rbtree.h +++ b/src/nxt_rbtree.h @@ -116,5 +116,16 @@ NXT_EXPORT nxt_rbtree_node_t nxt_rbtree_part_t *node); NXT_EXPORT void nxt_rbtree_delete(nxt_rbtree_t *tree, nxt_rbtree_part_t *node); +/* + * nxt_rbtree_destroy_next() is iterator to use only while rbtree destruction. + * It deletes a node from rbtree and returns the node. The rbtree is not + * rebalanced after deletion. At the beginning the "next" parameter should + * be equal to rbtree root. The iterator should be called in loop until + * the "next" parameter will be equal to the rbtree sentinel. No other + * operations must be performed on the rbtree while destruction. + */ +NXT_EXPORT nxt_rbtree_node_t *nxt_rbtree_destroy_next(nxt_rbtree_t *tree, + nxt_rbtree_node_t **next); + #endif /* _NXT_RBTREE_H_INCLUDED_ */ |