From 4ab5aaf8cfde77fbf894b4d658a2a36232d828e2 Mon Sep 17 00:00:00 2001 From: Tomoki Shirasawa Date: Thu, 9 May 2013 12:40:17 +0900 Subject: [PATCH] =?UTF-8?q?SC12=20OpenMP=20=E5=AE=9F=E8=A1=8C=E7=92=B0?= =?UTF-8?q?=E5=A2=83=E3=81=AE=E5=8F=96=E3=82=8A=E8=BE=BC=E3=81=BF=20(/proc?= =?UTF-8?q?/cpuinfo,=20/proc/meminfo,=20/sys/devices/system/cpu/online)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- executer/user/mcexec.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/executer/user/mcexec.c b/executer/user/mcexec.c index 68f62394..4bf7fec6 100644 --- a/executer/user/mcexec.c +++ b/executer/user/mcexec.c @@ -549,6 +549,7 @@ int main_loop(int fd, int cpu, pthread_mutex_t *lock) { struct syscall_wait_desc w; long ret; + char *fn; w.cpu = cpu; @@ -573,7 +574,17 @@ int main_loop(int fd, int cpu, pthread_mutex_t *lock) __dprintf("open: %s\n", dma_buf); - ret = open((char *)dma_buf, w.sr.args[1], w.sr.args[2]); + fn = (char *)dma_buf; + if(!strcmp(fn, "/proc/meminfo")){ + fn = "/admin/fs/attached/files/proc/meminfo"; + } + else if(!strcmp(fn, "/proc/cpuinfo")){ + fn = "/admin/fs/attached/files/proc/cpuinfo"; + } + else if(!strcmp(fn, "/sys/devices/system/cpu/online")){ + fn = "/admin/fs/attached/files/sys/devices/system/cpu/online"; + } + ret = open(fn, w.sr.args[1], w.sr.args[2]); SET_ERR(ret); do_syscall_return(fd, cpu, ret, 0, 0, 0, 0); break;