multi-threading improvements
@@ -358,13 +358,10 @@ static void grib_trie_with_rank_delete_container_list(grib_context* c,grib_trie_
}
*/
-void grib_trie_with_rank_delete_container(grib_trie_with_rank* t)
-{
- GRIB_MUTEX_INIT_ONCE(&once, &init);
- GRIB_MUTEX_LOCK(&mutex);
- DebugAssert(t);
+static void _grib_trie_with_rank_delete_container(grib_trie_with_rank* t)
{
int i;
+ DebugAssert(t);
for (i = t->first; i <= t->last; i++)
if (t->next[i]) {
grib_trie_with_rank_delete_container(t->next[i]);
@@ -377,6 +374,11 @@ void grib_trie_with_rank_delete_container(grib_trie_with_rank* t)
grib_context_free(t->context, t);
#endif
}
+void grib_trie_with_rank_delete_container(grib_trie_with_rank* t)
+{
+ GRIB_MUTEX_INIT_ONCE(&once, &init);
+ GRIB_MUTEX_LOCK(&mutex);
+ _grib_trie_with_rank_delete_container(t);
GRIB_MUTEX_UNLOCK(&mutex);
}
