terminate(): do not iterate process hash if no children processes exist
This commit is contained in:
@@ -625,7 +625,7 @@ static int syscall_packet_handler(struct ihk_ikc_channel_desc *c,
|
||||
syscall_channel_send(resp_channel, &pckt);
|
||||
|
||||
rc = do_kill(NULL, info.pid, info.tid, info.sig, &info.info, 0);
|
||||
kprintf("SCD_MSG_SEND_SIGNAL: do_kill(pid=%d, tid=%d, sig=%d)=%d\n", info.pid, info.tid, info.sig, rc);
|
||||
dkprintf("SCD_MSG_SEND_SIGNAL: do_kill(pid=%d, tid=%d, sig=%d)=%d\n", info.pid, info.tid, info.sig, rc);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
|
||||
@@ -811,6 +811,7 @@ terminate(int rc, int sig)
|
||||
kfree(ids);
|
||||
}
|
||||
|
||||
if (!list_empty(&proc->children_list)) {
|
||||
// clean up children
|
||||
for(i = 0; i < HASH_SIZE; i++){
|
||||
mcs_rwlock_writer_lock(&resource_set->process_hash->lock[i],
|
||||
@@ -854,6 +855,7 @@ terminate(int rc, int sig)
|
||||
mcs_rwlock_writer_unlock(&resource_set->process_hash->lock[i],
|
||||
&lock);
|
||||
}
|
||||
}
|
||||
|
||||
dkprintf("terminate,pid=%d\n", proc->pid);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user