summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-29 07:36:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-29 07:36:12 +0000
commit30cea657676db0ba703ae769fed4eafd5abc27fc (patch)
tree0f607ae4ea699393cb7ae9bfdf97cb600c30112c /load.c
parent95b30b0d07c40a3f7e0f0d8c74b1ae058034c8ad (diff)
* st.c (st_update): add existing parameter to the callback function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'load.c')
-rw-r--r--load.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/load.c b/load.c
index a320c51fc4..b85d903f6f 100644
--- a/load.c
+++ b/load.c
@@ -417,9 +417,10 @@ load_lock(const char *ftptr)
}
static int
-release_barrier(st_data_t key, st_data_t *value, st_data_t done)
+release_barrier(st_data_t key, st_data_t *value, st_data_t done, int existing)
{
VALUE barrier = (VALUE)*value;
+ if (!existing) return ST_STOP;
if (done ? rb_barrier_destroy(barrier) : rb_barrier_release(barrier)) {
/* still in-use */
return ST_CONTINUE;