Skip to content

Commit

Permalink
* load.c (load_lock): reverted.
Browse files Browse the repository at this point in the history
* thread.c (rb_barrier_wait): check for recursive wait.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Dec 24, 2007
1 parent 162cc94 commit 97cdb5a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Mon Dec 24 17:59:29 2007 Nobuyoshi Nakada <[email protected]>

* load.c (load_lock): reverted.

* thread.c (rb_barrier_wait): check for recursive wait.

Mon Dec 24 17:50:54 2007 Tanaka Akira <[email protected]>

* eval.c (function_call_may_return_twice_jmp_buf): removed.
Expand Down
3 changes: 1 addition & 2 deletions load.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,7 @@ load_lock(const char *ftptr)
st_insert(loading_tbl, (st_data_t)ftptr, data);
return (char *)ftptr;
}
rb_barrier_wait((VALUE)data);
return 0;
return RTEST(rb_barrier_wait((VALUE)data)) ? (char *)ftptr : 0;
}

static void
Expand Down
3 changes: 3 additions & 0 deletions thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -2555,6 +2555,9 @@ rb_barrier_wait(VALUE self)
if (thlist_signal(&barrier->waiting, 1, &barrier->owner)) return Qfalse;
return Qtrue;
}
else if (barrier->owner == GET_THREAD()) {
return Qfalse;
}
else {
*barrier->tail = q = ALLOC(rb_thread_list_t);
q->th = GET_THREAD();
Expand Down

0 comments on commit 97cdb5a

Please sign in to comment.