diff options
author | Brandon Potter <brandon.potter@amd.com> | 2018-04-18 14:57:57 -0400 |
---|---|---|
committer | Anthony Gutierrez <anthony.gutierrez@amd.com> | 2019-01-22 02:05:48 +0000 |
commit | bc74c58eaf55005a6a4b2e67657da4121554943c (patch) | |
tree | 92b04de877f151c7d5c562a117d695fdf913dc37 /src/arch/sparc | |
parent | c4e67f68377d9b3e909c76412b6ed2fde6a50e01 (diff) | |
download | gem5-bc74c58eaf55005a6a4b2e67657da4121554943c.tar.xz |
sim-se: add syscalls related to polling
Fix poll so that it will use the syscall retry capability
instead of causing a blocking call.
Add the accept and wait4 system calls.
Add polling to read to remove deadlocks that occur in the
event queue that are caused by blocking system calls.
Modify the write system call to return an error number in
case of error.
Change-Id: I0b4091a2e41e4187ebf69d63e0088f988f37d5da
Reviewed-on: https://gem5-review.googlesource.com/c/12115
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Diffstat (limited to 'src/arch/sparc')
-rw-r--r-- | src/arch/sparc/linux/syscalls.cc | 8 | ||||
-rw-r--r-- | src/arch/sparc/solaris/process.cc | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/arch/sparc/linux/syscalls.cc b/src/arch/sparc/linux/syscalls.cc index 7fdc922ef..ee8c60c45 100644 --- a/src/arch/sparc/linux/syscalls.cc +++ b/src/arch/sparc/linux/syscalls.cc @@ -91,8 +91,8 @@ SyscallDesc SparcLinuxProcess::syscall32Descs[] = { /* 0 */ SyscallDesc("restart_syscall", unimplementedFunc), /* 1 */ SyscallDesc("exit", exitFunc), // 32 bit /* 2 */ SyscallDesc("fork", unimplementedFunc), - /* 3 */ SyscallDesc("read", readFunc), - /* 4 */ SyscallDesc("write", writeFunc), + /* 3 */ SyscallDesc("read", readFunc<Sparc32Linux>), + /* 4 */ SyscallDesc("write", writeFunc<Sparc32Linux>), /* 5 */ SyscallDesc("open", openFunc<Sparc32Linux>), // 32 bit /* 6 */ SyscallDesc("close", closeFunc), /* 7 */ SyscallDesc("wait4", unimplementedFunc), // 32 bit @@ -397,8 +397,8 @@ SyscallDesc SparcLinuxProcess::syscallDescs[] = { /* 0 */ SyscallDesc("restart_syscall", unimplementedFunc), /* 1 */ SyscallDesc("exit", exitFunc), /* 2 */ SyscallDesc("fork", unimplementedFunc), - /* 3 */ SyscallDesc("read", readFunc), - /* 4 */ SyscallDesc("write", writeFunc), + /* 3 */ SyscallDesc("read", readFunc<SparcLinux>), + /* 4 */ SyscallDesc("write", writeFunc<SparcLinux>), /* 5 */ SyscallDesc("open", openFunc<SparcLinux>), /* 6 */ SyscallDesc("close", closeFunc), /* 7 */ SyscallDesc("wait4", unimplementedFunc), diff --git a/src/arch/sparc/solaris/process.cc b/src/arch/sparc/solaris/process.cc index 1afa35398..bcdd08814 100644 --- a/src/arch/sparc/solaris/process.cc +++ b/src/arch/sparc/solaris/process.cc @@ -67,8 +67,8 @@ SyscallDesc SparcSolarisProcess::syscallDescs[] = { /* 0 */ SyscallDesc("syscall", unimplementedFunc), /* 1 */ SyscallDesc("exit", exitFunc), /* 2 */ SyscallDesc("fork", unimplementedFunc), - /* 3 */ SyscallDesc("read", readFunc), - /* 4 */ SyscallDesc("write", writeFunc), + /* 3 */ SyscallDesc("read", readFunc<SparcSolaris>), + /* 4 */ SyscallDesc("write", writeFunc<SparcSolaris>), /* 5 */ SyscallDesc("open", openFunc<SparcSolaris>), /* 6 */ SyscallDesc("close", closeFunc), /* 7 */ SyscallDesc("wait", unimplementedFunc), |