Hi.
As shown the subject, I wonder how to check some node has been deleted from
the red-black tree?
The case is like the following:
Step 1:
node1 = ngx_rbtree_insert(...);
node2 = ngx_rbtree_insert(...);
node3 = ngx_rbtree_insert(...);
Step 2:
node = find_node_from_rbtree(...);
remove_expired_node(...); /* maybe include the node just found. */
new_node = malloc(...);
if (new_node == NULL) {
return;
}
/* We should keep the found node alive until the new node is succefully
allocated */
if (is_in_rbtree(node)) { /* I wonder how to check */
ngx_rbtree_delete(...);
}
ngx_rbtree_insert(new_node);
Or have other suggestions?
Thanks.
B.R.
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel