diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-19 14:12:04 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-19 14:12:04 +0000 |
| commit | 013decae26ae07ffeaef655eafffa0475ff491db (patch) | |
| tree | 7145fac9656a81aa73ccd6a425d5d55c80ef9753 /eval.c | |
| parent | aeed3beea26651761cda1831ef3ee1544bcbd689 (diff) | |
| download | ruby-013decae26ae07ffeaef655eafffa0475ff491db.tar.gz ruby-013decae26ae07ffeaef655eafffa0475ff491db.tar.xz ruby-013decae26ae07ffeaef655eafffa0475ff491db.zip | |
* rubysig.h (CHECK_INTS): prevent signal handler to run during
critical section. [ruby-core:04039]
* eval.c (load_wait): need not to call rb_thread_schedule()
explicitly. [ruby-core:04039]
* eval.c (rb_thread_schedule): clear rb_thread_critical.
[ruby-core:04039]
* st.c (st_free_table): do not call free() but xfree().
[ruby-core:06205]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
| -rw-r--r-- | eval.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -6864,19 +6864,19 @@ rb_provide(feature) rb_provide_feature(rb_str_new2(feature)); } -static void +static int load_wait(ftptr) char *ftptr; { st_data_t th; - if (!loading_tbl) return; - if (!st_lookup(loading_tbl, (st_data_t)ftptr, &th)) return; - if ((rb_thread_t)th == curr_thread) return; + if (!loading_tbl) return Qfalse; + if (!st_lookup(loading_tbl, (st_data_t)ftptr, &th)) return Qfalse; do { + if ((rb_thread_t)th == curr_thread) return Qtrue; CHECK_INTS; - rb_thread_schedule(); } while (st_lookup(loading_tbl, (st_data_t)ftptr, &th)); + return Qtrue; } /* @@ -7007,8 +7007,7 @@ rb_require_safe(fname, safe) ruby_safe_level = safe; found = search_required(fname, &feature, &path); if (found) { - if (!path) { - load_wait(RSTRING(feature)->ptr); + if (!path || load_wait(RSTRING(path)->ptr)) { result = Qfalse; } else { |
