X86: Hookup truncate/ftruncate syscalls on X86

This patch hooks up the truncate, ftruncate, truncate64 and ftruncate64
system calls on 32-bit and 64-bit X86.

These have been tested on both architectures.

ftruncate/ftruncate64 is needed for the f90 spec2k benchmarks.
This commit is contained in:
Vince Weaver 2009-10-30 12:51:13 -04:00
parent 9ad3acab5e
commit cf269025f9

View file

@ -307,8 +307,8 @@ SyscallDesc X86_64LinuxProcess::syscallDescs[] = {
/* 73 */ SyscallDesc("flock", unimplementedFunc), /* 73 */ SyscallDesc("flock", unimplementedFunc),
/* 74 */ SyscallDesc("fsync", unimplementedFunc), /* 74 */ SyscallDesc("fsync", unimplementedFunc),
/* 75 */ SyscallDesc("fdatasync", unimplementedFunc), /* 75 */ SyscallDesc("fdatasync", unimplementedFunc),
/* 76 */ SyscallDesc("truncate", unimplementedFunc), /* 76 */ SyscallDesc("truncate", truncateFunc),
/* 77 */ SyscallDesc("ftruncate", unimplementedFunc), /* 77 */ SyscallDesc("ftruncate", ftruncateFunc),
/* 78 */ SyscallDesc("getdents", unimplementedFunc), /* 78 */ SyscallDesc("getdents", unimplementedFunc),
/* 79 */ SyscallDesc("getcwd", unimplementedFunc), /* 79 */ SyscallDesc("getcwd", unimplementedFunc),
/* 80 */ SyscallDesc("chdir", unimplementedFunc), /* 80 */ SyscallDesc("chdir", unimplementedFunc),
@ -602,8 +602,8 @@ SyscallDesc I386LinuxProcess::syscallDescs[] = {
/* 89 */ SyscallDesc("readdir", unimplementedFunc), /* 89 */ SyscallDesc("readdir", unimplementedFunc),
/* 90 */ SyscallDesc("mmap", unimplementedFunc), /* 90 */ SyscallDesc("mmap", unimplementedFunc),
/* 91 */ SyscallDesc("munmap", munmapFunc), /* 91 */ SyscallDesc("munmap", munmapFunc),
/* 92 */ SyscallDesc("truncate", unimplementedFunc), /* 92 */ SyscallDesc("truncate", truncateFunc),
/* 93 */ SyscallDesc("ftruncate", unimplementedFunc), /* 93 */ SyscallDesc("ftruncate", ftruncateFunc),
/* 94 */ SyscallDesc("fchmod", unimplementedFunc), /* 94 */ SyscallDesc("fchmod", unimplementedFunc),
/* 95 */ SyscallDesc("fchown", unimplementedFunc), /* 95 */ SyscallDesc("fchown", unimplementedFunc),
/* 96 */ SyscallDesc("getpriority", unimplementedFunc), /* 96 */ SyscallDesc("getpriority", unimplementedFunc),
@ -703,8 +703,8 @@ SyscallDesc I386LinuxProcess::syscallDescs[] = {
/* 190 */ SyscallDesc("vfork", unimplementedFunc), /* 190 */ SyscallDesc("vfork", unimplementedFunc),
/* 191 */ SyscallDesc("ugetrlimit", unimplementedFunc), /* 191 */ SyscallDesc("ugetrlimit", unimplementedFunc),
/* 192 */ SyscallDesc("mmap2", mmapFunc<X86Linux32>), /* 192 */ SyscallDesc("mmap2", mmapFunc<X86Linux32>),
/* 193 */ SyscallDesc("truncate64", unimplementedFunc), /* 193 */ SyscallDesc("truncate64", truncate64Func),
/* 194 */ SyscallDesc("ftruncate64", unimplementedFunc), /* 194 */ SyscallDesc("ftruncate64", ftruncate64Func),
/* 195 */ SyscallDesc("stat64", stat64Func<X86Linux32>), /* 195 */ SyscallDesc("stat64", stat64Func<X86Linux32>),
/* 196 */ SyscallDesc("lstat64", unimplementedFunc), /* 196 */ SyscallDesc("lstat64", unimplementedFunc),
/* 197 */ SyscallDesc("fstat64", fstat64Func<X86Linux32>), /* 197 */ SyscallDesc("fstat64", fstat64Func<X86Linux32>),