1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* eval.c (rb_thread_cleanup): should not modify the global

variable curr_thread.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2002-08-21 08:30:09 +00:00
parent a7ed0fe4f9
commit c7c1384e60
5 changed files with 57 additions and 9 deletions

View file

@ -1,3 +1,8 @@
Wed Aug 21 16:43:19 2002 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (rb_thread_cleanup): should not modify the global
variable curr_thread.
Wed Aug 21 16:14:26 2002 WATANABE Hirofumi <eban@ruby-lang.org>
* configure.in: set ac_cv_func__setjmp to "no" on Cygwin.

11
eval.c
View file

@ -8866,13 +8866,14 @@ rb_thread_wait_other_threads()
static void
rb_thread_cleanup()
{
rb_thread_t th;
rb_thread_t curr, th;
while (curr_thread->status == THREAD_KILLED) {
curr_thread = curr_thread->prev;
curr = curr_thread;
while (curr->status == THREAD_KILLED) {
curr = curr_thread->prev;
}
FOREACH_THREAD(th) {
FOREACH_THREAD_FROM(curr, th) {
if (th->status != THREAD_KILLED) {
rb_thread_ready(th);
th->gid = 0;
@ -8883,7 +8884,7 @@ rb_thread_cleanup()
}
}
}
END_FOREACH(th);
END_FOREACH_FROM(curr, th);
}
int rb_thread_critical;

View file

@ -295,6 +295,25 @@ SRC
return true
end
def find_executable(bin, path = nil)
if path.nil?
path = ENV['PATH'].split(Config::CONFIG['PATH_SEPARATOR'])
else
path = path.split(Config::CONFIG['PATH_SEPARATOR'])
end
bin += "@EXEEXT@"
for dir in path
file = File.join(dir, bin)
if FileTest.executable?(file)
return file
else
next
end
end
return nil
end
def arg_config(config, default=nil)
unless defined? $configure_args
$configure_args = {}

7
io.c
View file

@ -2378,10 +2378,9 @@ static VALUE
rb_io_putc(io, ch)
VALUE io, ch;
{
char c[2];
c[0] = NUM2CHR(ch);
c[1] = '\0';
rb_io_write(io, rb_str_new(c, 1));
char c = NUM2CHR(ch);
rb_io_write(io, rb_str_new(&c, 1));
return ch;
}

View file

@ -351,6 +351,30 @@ SRC
return true
end
def find_executable(bin, path = nil)
printf "checking for %s... ", bin
STDOUT.flush
if path.nil?
path = ENV['PATH'].split(Config::CONFIG['PATH_SEPARATOR'])
else
path = path.split(Config::CONFIG['PATH_SEPARATOR'])
end
bin += Config::CONFIG['EXEEXT']
for dir in path
file = File.join(dir, bin)
if FileTest.executable?(file)
print "yes\n"
return file
else
next
end
end
print "no\n"
return nil
end
def arg_config(config, default=nil)
$configure_args.fetch(config, default)
end