[asterisk-commits] dlee: branch dlee/hashtab-skiplist r399773 - /team/dlee/hashtab-skiplist/main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Sep 25 08:50:11 CDT 2013
Author: dlee
Date: Wed Sep 25 08:50:09 2013
New Revision: 399773
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399773
Log:
Remove OBJ_CONTINUE checks in a vain attempt to optimize
Modified:
team/dlee/hashtab-skiplist/main/astobj2.c
Modified: team/dlee/hashtab-skiplist/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/hashtab-skiplist/main/astobj2.c?view=diff&rev=399773&r1=399772&r2=399773
==============================================================================
--- team/dlee/hashtab-skiplist/main/astobj2.c (original)
+++ team/dlee/hashtab-skiplist/main/astobj2.c Wed Sep 25 08:50:09 2013
@@ -2335,10 +2335,6 @@
bucket_cur = AST_DLLIST_LAST(&self->skip_list);
}
- if (flags & OBJ_CONTINUE) {
- ast_assert(0); // TODO
- }
-
/* For each bucket */
for (; bucket_cur; bucket_cur = AST_DLLIST_PREV(bucket_cur, skip_links)) {
/* For each node in the bucket. */
@@ -2356,9 +2352,7 @@
if (cmp > 0) {
continue;
}
- if (flags & OBJ_CONTINUE) {
- ast_assert(0); // TODO
- } else if (cmp < 0) {
+ if (cmp < 0) {
/* No more nodes in this bucket are possible to match. */
break;
}
@@ -2369,20 +2363,6 @@
return node;
}
- /* Was this the starting bucket? */
- if (0//bucket_cur == state->bucket_start
- && (flags & OBJ_CONTINUE)
- && (flags & OBJ_SEARCH_MASK) != OBJ_SEARCH_NONE) {
- ast_assert(0); // TODO
- }
-
- /* Was this the first container bucket? */
- if (bucket_cur == 0
- && (flags & OBJ_CONTINUE)
- && (flags & OBJ_SEARCH_MASK) != OBJ_SEARCH_NONE) {
- ast_assert(0); // TODO
- }
-
if (state->one_bucket) {
break;
}
@@ -2390,10 +2370,6 @@
} else {
if (bucket_cur == NULL) {
bucket_cur = AST_DLLIST_FIRST(&self->skip_list);
- }
-
- if (flags & OBJ_CONTINUE) {
- ast_assert(0); // TODO
}
/* For each bucket */
@@ -2413,9 +2389,7 @@
if (cmp < 0) {
continue;
}
- if (flags & OBJ_CONTINUE) {
- ast_assert(0); // TODO
- } else if (cmp > 0) {
+ if (cmp > 0) {
/* No more nodes in this bucket are possible to match. */
break;
}
@@ -2424,20 +2398,6 @@
/* We have the first traversal node */
__ao2_ref(node, +1);
return node;
- }
-
- /* Was this the starting bucket? */
- if (0 //bucket_cur == state->bucket_start
- && (flags & OBJ_CONTINUE)
- && (flags & OBJ_SEARCH_MASK) != OBJ_SEARCH_NONE) {
- ast_assert(0); // TODO
- }
-
- /* Was this the last container bucket? */
- if (0 // bucket_cur == self->n_buckets - 1
- && (flags & OBJ_CONTINUE)
- && (flags & OBJ_SEARCH_MASK) != OBJ_SEARCH_NONE) {
- ast_assert(0); // TODO
}
}
}
@@ -2525,13 +2485,6 @@
hash_descending_resume:;
}
-
- /* Was this the first container bucket? */
- if (bucket_cur == 0
- && (flags & OBJ_CONTINUE)
- && (flags & OBJ_SEARCH_MASK) != OBJ_SEARCH_NONE) {
- ast_assert(0); // TODO
- }
}
} else {
goto hash_ascending_resume;
@@ -2580,13 +2533,6 @@
prev = node;
hash_ascending_resume:;
- }
-
- /* Was this the last container bucket? */
- if (0 //bucket_cur == self->n_buckets - 1
- && (flags & OBJ_CONTINUE)
- && (flags & OBJ_SEARCH_MASK) != OBJ_SEARCH_NONE) {
- ast_assert(0); // TODO
}
}
}
More information about the asterisk-commits
mailing list