From 34854d3c93e108d43b98b0bdb781a81b0ef5453c Mon Sep 17 00:00:00 2001 From: Tomoki Shirasawa Date: Mon, 1 Sep 2014 14:27:31 +0900 Subject: [PATCH] ltp times03 --- executer/user/mcexec.c | 44 ++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/executer/user/mcexec.c b/executer/user/mcexec.c index c13890f9..15c19e96 100644 --- a/executer/user/mcexec.c +++ b/executer/user/mcexec.c @@ -608,33 +608,27 @@ sendsig(int sig, siginfo_t *siginfo, void *context) siginfo->si_signo == SIGINT) return; - if(tid == master_tid){ - cpu = 0; - remote_tid = -1; + for(i = 0; i < ncpu; i++){ + if(siginfo->si_pid == pid && + thread_data[i].tid == tid){ + if(thread_data[i].terminate) + return; + break; + } + if(siginfo->si_pid != pid && + thread_data[i].remote_tid == tid){ + if(thread_data[i].terminate) + return; + break; + } + } + if(i != ncpu){ + remote_tid = thread_data[i].remote_tid; + cpu = thread_data[i].cpu; } else{ - for(i = 1; i < ncpu; i++){ - if(siginfo->si_pid == pid && - thread_data[i].tid == tid){ - if(thread_data[i].terminate) - return; - break; - } - if(siginfo->si_pid != pid && - thread_data[i].remote_tid == tid){ - if(thread_data[i].terminate) - return; - break; - } - } - if(i != ncpu){ - remote_tid = thread_data[i].remote_tid; - cpu = thread_data[i].cpu; - } - else{ - cpu = 0; - remote_tid = -1; - } + cpu = 0; + remote_tid = -1; } sigdesc.cpu = cpu;