summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--thread.c12
-rw-r--r--vm.c2
-rw-r--r--vm_trace.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/thread.c b/thread.c
index 0454bd7..e4166b5 100644
--- a/thread.c
+++ b/thread.c
@@ -371,7 +371,7 @@ rb_threadptr_trap_interrupt(rb_thread_t *th)
static void
terminate_all(rb_vm_t *vm, const rb_thread_t *main_thread)
{
- rb_thread_t *th;
+ rb_thread_t *th = 0;
list_for_each(&vm->living_threads, th, vmlt_node) {
if (th != main_thread) {
@@ -2070,7 +2070,7 @@ void
rb_thread_fd_close(int fd)
{
rb_vm_t *vm = GET_THREAD()->vm;
- rb_thread_t *th;
+ rb_thread_t *th = 0;
list_for_each(&vm->living_threads, th, vmlt_node) {
if (th->waiting_fd == fd) {
@@ -2324,7 +2324,7 @@ rb_thread_list(void)
{
VALUE ary = rb_ary_new();
rb_vm_t *vm = GET_THREAD()->vm;
- rb_thread_t *th;
+ rb_thread_t *th = 0;
list_for_each(&vm->living_threads, th, vmlt_node) {
switch (th->status) {
@@ -3882,7 +3882,7 @@ thgroup_list(VALUE group)
{
VALUE ary = rb_ary_new();
rb_vm_t *vm = GET_THREAD()->vm;
- rb_thread_t *th;
+ rb_thread_t *th = 0;
list_for_each(&vm->living_threads, th, vmlt_node) {
if (th->thgroup == group) {
@@ -5030,7 +5030,7 @@ static void
debug_deadlock_check(rb_vm_t *vm)
{
#ifdef DEBUG_DEADLOCK_CHECK
- rb_thread_t *th;
+ rb_thread_t *th = 0;
printf("%d %d %p %p\n", vm_living_thread_num(vm), vm->sleeper, GET_THREAD(), vm->main_thread);
list_for_each(&vm->living_threads, th, vmlt_node) {
@@ -5053,7 +5053,7 @@ static void
rb_check_deadlock(rb_vm_t *vm)
{
int found = 0;
- rb_thread_t *th;
+ rb_thread_t *th = 0;
if (vm_living_thread_num(vm) > vm->sleeper) return;
if (vm_living_thread_num(vm) < vm->sleeper) rb_bug("sleeper must not be more than vm_living_thread_num(vm)");
diff --git a/vm.c b/vm.c
index f66122b..ae0148e 100644
--- a/vm.c
+++ b/vm.c
@@ -1696,7 +1696,7 @@ rb_vm_mark(void *ptr)
RUBY_GC_INFO("-------------------------------------------------\n");
if (ptr) {
rb_vm_t *vm = ptr;
- rb_thread_t *th;
+ rb_thread_t *th = 0;
list_for_each(&vm->living_threads, th, vmlt_node) {
rb_gc_mark(th->self);
diff --git a/vm_trace.c b/vm_trace.c
index 678b819..a562619 100644
--- a/vm_trace.c
+++ b/vm_trace.c
@@ -216,7 +216,7 @@ void
rb_clear_trace_func(void)
{
rb_vm_t *vm = GET_VM();
- rb_thread_t *th;
+ rb_thread_t *th = 0;
list_for_each(&vm->living_threads, th, vmlt_node) {
rb_threadptr_remove_event_hook(th, 0, Qundef);