use per-process wait queues for system call request processing in mcexec so that multiple processes can share the per-core system call channels

This commit is contained in:
Balazs Gerofi bgerofi@riken.jp
2014-03-27 19:31:42 +09:00
parent 11ddbcf3c8
commit ccd770ba24
8 changed files with 138 additions and 16 deletions

View File

@ -664,7 +664,7 @@ int main(int argc, char **argv)
argv[optind + 2] = NULL;
argc -= (optind - 1);
printf("target_core: %d, device: %s, command: ", target_core, dev);
__dprintf("target_core: %d, device: %s, command: ", target_core, dev);
for (i = 1; i < argc; ++i) {
printf("%s ", argv[i]);
}
@ -966,6 +966,7 @@ int main_loop(int fd, int cpu, pthread_mutex_t *lock)
struct timeval tv;
w.cpu = cpu;
w.pid = getpid();
while (((ret = ioctl(fd, MCEXEC_UP_WAIT_SYSCALL, (unsigned long)&w)) == 0) || (ret == -1 && errno == EINTR)) {