*freebsd*)
AC_MSG_RESULT([ok (${host_os})])
VGCONF_OS="freebsd"
- AC_DEFINE([FREEBSD_10], 1000, [FREEBSD_VERS value for FreeBSD 10.x])
- freebsd_10=1000
AC_DEFINE([FREEBSD_11], 1100, [FREEBSD_VERS value for FreeBSD 11.x])
freebsd_11=1100
AC_DEFINE([FREEBSD_12], 1200, [FREEBSD_VERS value for FreeBSD 12.0 to 12.1])
kernel=`uname -r`
case "${kernel}" in
- 10.*)
- AC_MSG_RESULT([FreeBSD 10.x (${kernel})])
- AC_DEFINE([FREEBSD_VERS], FREEBSD_10, [FreeBSD version])
- freebsd_vers=$freebsd_10
- ;;
11.*)
AC_MSG_RESULT([FreeBSD 11.x (${kernel})])
AC_DEFINE([FREEBSD_VERS], FREEBSD_11, [FreeBSD version])
;;
*)
AC_MSG_RESULT([unsupported (${kernel})])
- AC_MSG_ERROR([Valgrind works on FreeBSD 10.x to 15.x])
+ AC_MSG_ERROR([Valgrind works on FreeBSD 11.x to 15.x])
;;
esac
;;
;;
*)
AC_MSG_RESULT([unsupported (${kernel})])
- AC_MSG_ERROR([Valgrind works on FreeBSD 10.x to 15.x])
+ AC_MSG_ERROR([Valgrind works on FreeBSD 11.x to 15.x])
;;
esac
;;
;;
*)
AC_MSG_RESULT([unsupported (${kernel})])
- AC_MSG_ERROR([Valgrind works on FreeBSD 10.x to 15.x])
+ AC_MSG_ERROR([Valgrind works on FreeBSD 11.x to 15.x])
;;
esac
//DECL_TEMPLATE(freebsd, sys_nfssvc) 155
DECL_TEMPLATE(freebsd, sys_lgetfh) // 160
DECL_TEMPLATE(freebsd, sys_getfh) // 161
-#if (FREEBSD_VERS <= FREEBSD_10)
-DECL_TEMPLATE(freebsd, sys_freebsd4_getdomainname) // 162
-DECL_TEMPLATE(freebsd, sys_freebsd4_setdomainname) // 163
-DECL_TEMPLATE(freebsd, sys_freebsd4_uname) // 164
-#endif
+//DECL_TEMPLATE(freebsd, sys_freebsd4_getdomainname) // 162
+//DECL_TEMPLATE(freebsd, sys_freebsd4_setdomainname) // 163
+//DECL_TEMPLATE(freebsd, sys_freebsd4_uname) // 164
DECL_TEMPLATE(freebsd, sys_sysarch) // 165
DECL_TEMPLATE(freebsd, sys_rtprio) // 166
//DECL_TEMPLATE(freebsd, sys_semsys) 169
//DECL_TEMPLATE(freebsd, sys_msgsys) 170
//DECL_TEMPLATE(freebsd, sys_shmsys) 171
-#if (FREEBSD_VERS <= FREEBSD_10)
-DECL_TEMPLATE(freebsd, sys_freebsd6_pread) // 173
-DECL_TEMPLATE(freebsd, sys_freebsd6_pwrite) // 174
-#endif
+//DECL_TEMPLATE(freebsd, sys_freebsd6_pread) // 173
+//DECL_TEMPLATE(freebsd, sys_freebsd6_pwrite) // 174
DECL_TEMPLATE(freebsd, sys_setfib) // 175
//DECL_TEMPLATE(freebsd, sys_ntp_adjtime) 176
// generic setgid 181
DECL_TEMPLATE(freebsd, sys_getdirentries) // 196
#endif
-#if (FREEBSD_VERS <= FREEBSD_10)
-DECL_TEMPLATE(freebsd, sys_freebsd6_mmap) // 197
-#endif
+//DECL_TEMPLATE(freebsd, sys_freebsd6_mmap) // 197
+//DECL_TEMPLATE(freebsd, sys_freebsd6_lseek) // 199
+//DECL_TEMPLATE(freebsd, sys_freebsd6_truncate) // 200
+//DECL_TEMPLATE(freebsd, sys_freebsd6_ftruncate) // 201
-#if (FREEBSD_VERS <= FREEBSD_10)
-DECL_TEMPLATE(freebsd, sys_freebsd6_lseek) // 199
-DECL_TEMPLATE(freebsd, sys_freebsd6_truncate) // 200
-DECL_TEMPLATE(freebsd, sys_freebsd6_ftruncate) // 201
-#endif
DECL_TEMPLATE(freebsd, sys___sysctl) // 202
// generic mlock 202
// generic munlock 203
}
// freebsd6_pread 173
-#if (FREEBSD_VERS <= FREEBSD_10)
-PRE(sys_freebsd6_pread)
-{
- *flags |= SfMayBlock;
- PRINT("sys_freebsd6_pread ( %" FMT_REGWORD "u, %#" FMT_REGWORD "x, %lu, %" FMT_REGWORD "u, %" FMT_REGWORD "u )", ARG1, ARG2, ARG3, ARG4, ARG5);
- PRE_REG_READ5(ssize_t, "read",
- unsigned int, fd, char *, buf, vki_size_t, count,
- int, pad, unsigned long, off);
-
- if (!ML_(fd_allowed)(ARG1, "freebsd6_pread", tid, False))
- SET_STATUS_Failure( VKI_EBADF );
- else
- PRE_MEM_WRITE( "freebsd6_pread(buf)", ARG2, ARG3 );
-}
-
-POST(sys_freebsd6_pread)
-{
- vg_assert(SUCCESS);
- POST_MEM_WRITE( ARG2, RES );
-}
-#endif
+// removed
// freebsd6_pwrite 174
-#if (FREEBSD_VERS <= FREEBSD_10)
-PRE(sys_freebsd6_pwrite)
-{
- Bool ok;
- *flags |= SfMayBlock;
- PRINT("sys_freebsd6_pwrite ( %" FMT_REGWORD "d, %#" FMT_REGWORD "x, %" FMT_REGWORD "u, %" FMT_REGWORD "u, %" FMT_REGWORD "u )", SARG1, ARG2, ARG3, ARG4, ARG5);
- PRE_REG_READ5(ssize_t, "write",
- unsigned int, fd, const char *, buf, vki_size_t, count,
- int, pad, unsigned long, off);
- /* check to see if it is allowed. If not, try for an exemption from
- --sim-hints=enable-outer (used for self hosting). */
- ok = ML_(fd_allowed)(ARG1, "freebsd6_pwrite", tid, False);
- if (!ok && ARG1 == 2/*stderr*/
- && SimHintiS(SimHint_enable_outer, VG_(clo_sim_hints)))
- ok = True;
- if (!ok)
- SET_STATUS_Failure( VKI_EBADF );
- else
- PRE_MEM_READ( "freebsd6_pwrite(buf)", ARG2, ARG3 );
-}
-#endif
+// removed
// SYS_freebsd6_mmap 197
-#if (FREEBSD_VERS <= FREEBSD_10)
-/* This is here because on x86 the off_t is passed in 2 regs. Don't ask about pad. */
-
-/* caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, int pad, off_t pos); */
-/* ARG1 ARG2 ARG3 ARG4 ARG5 ARG6 ARG7 */
-
-PRE(sys_freebsd6_mmap)
-{
- SysRes r;
-
- PRINT("sys_mmap ( %#" FMT_REGWORD "x, %" FMT_REGWORD "u, %" FMT_REGWORD "u, %" FMT_REGWORD "u, %" FMT_REGWORD "u, pad%" FMT_REGWORD "u, 0x%" FMT_REGWORD "x)",
- ARG1, (UWord)ARG2, ARG3, ARG4, ARG5, ARG6, ARG7 );
- PRE_REG_READ7(long, "mmap",
- char *, addr, unsigned long, len, int, prot, int, flags,
- int, fd, int, pad, unsigned long, pos);
-
- r = ML_(generic_PRE_sys_mmap)( tid, ARG1, ARG2, ARG3, ARG4, ARG5, ARG7 );
- SET_STATUS_from_SysRes(r);
-}
-#endif
+// removed
// freebsd6_lseek 199
-#if (FREEBSD_VERS <= FREEBSD_10)
-PRE(sys_freebsd6_lseek)
-{
- PRINT("sys_freebsd6_lseek ( %" FMT_REGWORD "u, 0x%" FMT_REGWORD "x, %#" FMT_REGWORD "x, %" FMT_REGWORD "u )", ARG1,ARG2,ARG3,ARG4);
- PRE_REG_READ4(long, "lseek",
- unsigned int, fd, int, pad, unsigned long, offset,
- unsigned int, whence);
-}
-#endif
+// removed
// freebsd6_truncate 200
-#if (FREEBSD_VERS <= FREEBSD_10)
-PRE(sys_freebsd6_truncate)
-{
- *flags |= SfMayBlock;
- PRINT("sys_truncate ( %#" FMT_REGWORD "x(%s), %" FMT_REGWORD "u )", ARG1,(char *)ARG1,ARG3);
- PRE_REG_READ3(long, "truncate",
- const char *, path, int, pad, unsigned int, length);
- PRE_MEM_RASCIIZ( "truncate(path)", ARG1 );
-}
-#endif
+// removed
// freebsd6_ftruncate 201
-#if (FREEBSD_VERS <= FREEBSD_10)
-PRE(sys_freebsd6_ftruncate)
-{
- *flags |= SfMayBlock;
- PRINT("sys_ftruncate ( %" FMT_REGWORD "u, %" FMT_REGWORD "u )", ARG1,ARG3);
- PRE_REG_READ3(long, "ftruncate", unsigned int, fd, int, pad,
- unsigned int, length);
-}
-#endif
+// removed
// SYS_clock_getcpuclockid2 247
// no manpage for this, from syscalls.master
POST_MEM_WRITE(ARG2, sizeof(vki_fhandle_t));
}
-#if (FREEBSD_VERS <= FREEBSD_10)
-// 162
-// int getdomainname(char *domainname, int len);
-PRE(sys_freebsd4_getdomainname)
-{
- PRINT("sys_freebsd4_getdomainname ( %#" FMT_REGWORD "x, %" FMT_REGWORD "u )",ARG1,ARG2);
- PRE_REG_READ2(int, "getdomainname",
- char *, domainname, int, len);
- PRE_MEM_WRITE( "getdomainname(domainname)", ARG1, ARG2 );
-}
-
-POST(sys_freebsd4_getdomainname)
-{
- if (ARG1 != 0) {
- POST_MEM_WRITE( ARG1, ARG2 );
- }
-}
-
-// 163
-// int setdomainname(char *domainname, int len);
-PRE(sys_freebsd4_setdomainname)
-{
- PRINT("sys_freebsd4_setdomainname ( %#" FMT_REGWORD "x )",ARG1);
- PRE_REG_READ2(int, "setdomainname", char *, domainname, int, len);
- PRE_MEM_RASCIIZ( "setdomainname(domainname)", ARG1 );
-}
+// freebsd4 getdomainname 162
+// removed
-// 164
-// int uname(struct utsname *name);
-PRE(sys_freebsd4_uname)
-{
- PRINT("sys_freebsd4_uname ( %#" FMT_REGWORD "x )", ARG1);
- PRE_REG_READ1(int, "uname", struct utsname *, name);
- PRE_MEM_WRITE( "uname(name)", ARG1, sizeof(struct vki_utsname) );
-}
+// freebsd4 setdomainname 163
+// removed
-POST(sys_freebsd4_uname)
-{
- if (ARG1 != 0) {
- POST_MEM_WRITE( ARG1, sizeof(struct vki_utsname) );
- }
-}
-#endif
+// freebsd4 uname 164
+// removed
// SYS_sysarch 165
// x86/amd64
}
}
-#if (FREEBSD_VERS <= FREEBSD_10)
-// SYS__umtx_lock 434
-PRE(sys__umtx_lock)
-{
- PRINT( "sys__umtx_lock ( %#" FMT_REGWORD "x )", ARG1);
- PRE_REG_READ1(long, "_umtx_lock", struct vki_umtx *, umtx);
- PRE_MEM_READ( "_umtx_lock(mtx)", ARG1, sizeof(struct vki_umtx) );
- PRE_MEM_WRITE( "_umtx_lock(mtx)", ARG1, sizeof(struct vki_umtx) );
-}
+// SYS_freebsd10__umtx_lock 434
+// removed
-POST(sys__umtx_lock)
-{
- if (SUCCESS) {
- POST_MEM_WRITE(ARG1, sizeof(struct vki_umtx));
- }
-}
-
-// SYS__umtx_unlock 434
-PRE(sys__umtx_unlock)
-{
- PRINT( "sys__umtx_unlock ( %#" FMT_REGWORD "x )", ARG1);
- PRE_REG_READ1(long, "_umtx_unlock", struct vki_umtx *, umtx);
- PRE_MEM_READ( "_umtx_unlock(mtx)", ARG1, sizeof(struct vki_umtx) );
- PRE_MEM_WRITE( "_umtx_unlock(mtx)", ARG1, sizeof(struct vki_umtx) );
-}
-
-POST(sys__umtx_unlock)
-{
- if (SUCCESS) {
- POST_MEM_WRITE(ARG1, sizeof(struct vki_umtx));
- }
-}
-#endif
+// SYS_freebsd10__umtx_unlock 434
+// removed
// SYS_jail_attach 436
// int jail_attach(int jid);
BSDXY(__NR_lgetfh, sys_lgetfh), // 160
BSDXY(__NR_getfh, sys_getfh), // 161
-#if (FREEBSD_VERS <= FREEBSD_10)
- BSDXY(__NR_freebsd4_getdomainname, sys_freebsd4_getdomainname), // 162
- BSDX_(__NR_freebsd4_setdomainname, sys_freebsd4_setdomainname), // 163
- BSDXY(__NR_freebsd4_uname, sys_freebsd4_uname), // 164
-#endif
+ //BSDXY(__NR_freebsd4_getdomainname, sys_freebsd4_getdomainname), // 162
+ //BSDX_(__NR_freebsd4_setdomainname, sys_freebsd4_setdomainname), // 163
+ //BSDXY(__NR_freebsd4_uname, sys_freebsd4_uname), // 164
BSDXY(__NR_sysarch, sys_sysarch), // 165
BSDXY(__NR_rtprio, sys_rtprio), // 166
// msgsys 170
// shmsys 171
-#if (FREEBSD_VERS <= FREEBSD_10)
- BSDXY(__NR_freebsd6_pread, sys_freebsd6_pread), // 173
- BSDX_(__NR_freebsd6_pwrite, sys_freebsd6_pwrite), // 174
-#endif
+ //BSDXY(__NR_freebsd6_pread, sys_freebsd6_pread), // 173
+ //BSDX_(__NR_freebsd6_pwrite, sys_freebsd6_pwrite), // 174
BSDX_(__NR_setfib, sys_setfib), // 175
// @todo PJF this exists on Darwin and Solaris as well
#else
BSDXY(__NR_getdirentries, sys_getdirentries), // 196
#endif
-#if (FREEBSD_VERS <= FREEBSD_10)
- BSDX_(__NR_freebsd6_mmap, sys_freebsd6_mmap), // 197
-#endif
+ //BSDX_(__NR_freebsd6_mmap, sys_freebsd6_mmap), // 197
// __syscall (handled specially) // 198
-#if (FREEBSD_VERS <= FREEBSD_10)
- BSDX_(__NR_freebsd6_lseek, sys_freebsd6_lseek), // 199
- BSDX_(__NR_freebsd6_truncate, sys_freebsd6_truncate), // 200
- BSDX_(__NR_freebsd6_ftruncate, sys_freebsd6_ftruncate), // 201
-#endif
+ //BSDX_(__NR_freebsd6_lseek, sys_freebsd6_lseek), // 199
+ //BSDX_(__NR_freebsd6_truncate, sys_freebsd6_truncate), // 200
+ //BSDX_(__NR_freebsd6_ftruncate, sys_freebsd6_ftruncate), // 201
BSDXY(__NR___sysctl, sys___sysctl), // 202
GENX_(__NR_mlock, sys_mlock), // 203
BSDXY(__NR_thr_self, sys_thr_self), // 432
BSDXY(__NR_thr_kill, sys_thr_kill), // 433
-#if (FREEBSD_VERS <= FREEBSD_10)
- BSDXY(__NR__umtx_lock, sys__umtx_lock), // 434
- BSDXY(__NR__umtx_unlock, sys__umtx_unlock), // 435
-#endif
+ //BSDXY(__NR__umtx_lock, sys__umtx_lock), // 434
+ //BSDXY(__NR__umtx_unlock, sys__umtx_unlock), // 435
BSDX_(__NR_jail_attach, sys_jail_attach), // 436
BSDXY(__NR_extattr_list_fd, sys_extattr_list_fd), // 437
// 544 is the highest syscall on FreeBSD 9
-#if (FREEBSD_VERS >= FREEBSD_10)
-
BSDXY(__NR_ppoll, sys_ppoll), // 545
BSDX_(__NR_futimens, sys_futimens), // 546
BSDX_(__NR_utimensat, sys_utimensat), // 547
-#endif // FREEBSD_VERS >= FREEBSD_10
+ // 547 is the highest syscall on FreeBSD 10
#if (FREEBSD_VERS >= FREEBSD_11)
}
// freebsd6_pread 173
-#if (FREEBSD_VERS <= FREEBSD_10)
-PRE(sys_freebsd6_pread)
-{
- *flags |= SfMayBlock;
- PRINT("sys_freebsd6_pread ( %" FMT_REGWORD "u, %#" FMT_REGWORD "x, %" FMT_REGWORD "u, %" FMT_REGWORD "u, %" FMT_REGWORD "u )", ARG1, ARG2, ARG3, ARG5, ARG6);
- PRE_REG_READ6(ssize_t, "pread",
- unsigned int, fd, char *, buf, vki_size_t, count,
- int, pad, unsigned int, off_low, unsigned int, off_high);
-
- if (!ML_(fd_allowed)(ARG1, "freebsd6_pread", tid, False))
- SET_STATUS_Failure( VKI_EBADF );
- else
- PRE_MEM_WRITE( "freebsd6_pread(buf)", ARG2, ARG3 );
-}
-
-POST(sys_freebsd6_pread)
-{
- vg_assert(SUCCESS);
- POST_MEM_WRITE( ARG2, RES );
-}
-#endif
+// removed
// freebsd6_pwrite 174
-#if (FREEBSD_VERS <= FREEBSD_10)
-PRE(sys_freebsd6_pwrite)
-{
- Bool ok;
- *flags |= SfMayBlock;
- PRINT("sys_freebsd6_pwrite ( %" FMT_REGWORD "u, %#" FMT_REGWORD "x, %" FMT_REGWORD "u, %" FMT_REGWORD "u, %" FMT_REGWORD "u )", ARG1, ARG2, ARG3, ARG5, ARG6);
- PRE_REG_READ6(ssize_t, "freebsd6_pwrite",
- unsigned int, fd, const char *, buf, vki_size_t, count,
- int, pad, unsigned int, off_low, unsigned int, off_high);
- /* check to see if it is allowed. If not, try for an exemption from
- --sim-hints=enable-outer (used for self hosting). */
- ok = ML_(fd_allowed)(ARG1, "freebsd6_pwrite", tid, False);
- if (!ok && ARG1 == 2/*stderr*/
- && SimHintiS(SimHint_enable_outer, VG_(clo_sim_hints)))
- ok = True;
- if (!ok)
- SET_STATUS_Failure( VKI_EBADF );
- else
- PRE_MEM_READ( "freebsd6_write(buf)", ARG2, ARG3 );
-}
-#endif
+// removed
// SYS_freebsd6_mmap 197
-#if (FREEBSD_VERS <= FREEBSD_10)
-/* This is here because on x86 the off_t is passed in 2 regs. Don't ask about pad. */
-
-/* caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, int pad, off_t pos); */
-/* ARG1 ARG2 ARG3 ARG4 ARG5 ARG6 ARG7+ARG8 */
-
-PRE(sys_freebsd6_mmap)
-{
- SysRes r;
-
- PRINT("sys_freebsd6_mmap ( %#" FMT_REGWORD "x, %" FMT_REGWORD "u, %" FMT_REGWORD "u, %" FMT_REGWORD "u, %" FMT_REGWORD "u, pad%" FMT_REGWORD "u, lo0x%" FMT_REGWORD "x hi0x%" FMT_REGWORD "x)",
- ARG1, (UWord)ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8 );
- PRE_REG_READ8(long, "mmap",
- char *, addr, unsigned long, len, int, prot, int, flags,
- int, fd, int, pad, unsigned long, lo, unsigned long, hi);
-
- r = ML_(generic_PRE_sys_mmap)( tid, ARG1, ARG2, ARG3, ARG4, ARG5, MERGE64(ARG7,ARG8) );
- SET_STATUS_from_SysRes(r);
-}
-#endif
+// removed
// freebsd6_lseek 199
-#if (FREEBSD_VERS <= FREEBSD_10)
-PRE(sys_freebsd6_lseek)
-{
- PRINT("sys_freebsd6_lseek ( %" FMT_REGWORD "u, 0x%" FMT_REGWORD "x, 0x%" FMT_REGWORD "x, %" FMT_REGWORD "u )", ARG1,ARG3,ARG4,ARG5);
- PRE_REG_READ5(long, "lseek",
- unsigned int, fd, int, pad, unsigned int, offset_low,
- unsigned int, offset_high, unsigned int, whence);
-}
-#endif
+// removed
// freebsd6_truncate 200
-#if (FREEBSD_VERS <= FREEBSD_10)
-PRE(sys_freebsd6_truncate)
-{
- *flags |= SfMayBlock;
- PRINT("sys_truncate ( %#" FMT_REGWORD "x(%s), %" FMT_REGWORD "u, %" FMT_REGWORD "u )", ARG1,(char *)ARG1,ARG3,ARG4);
- PRE_REG_READ4(long, "truncate",
- const char *, path, int, pad,
- unsigned int, length_low, unsigned int, length_high);
- PRE_MEM_RASCIIZ( "truncate(path)", ARG1 );
-}
-#endif
+// removed
// freebsd6_ftruncate 201
-#if (FREEBSD_VERS <= FREEBSD_10)
-PRE(sys_freebsd6_ftruncate)
-{
- *flags |= SfMayBlock;
- PRINT("sys_ftruncate ( %" FMT_REGWORD "u, %" FMT_REGWORD "u, %" FMT_REGWORD "u )", ARG1,ARG3,ARG4);
- PRE_REG_READ4(long, "ftruncate", unsigned int, fd, int, pad,
- unsigned int, length_low, unsigned int, length_high);
-}
-#endif
+// removed
// SYS_clock_getcpuclockid2 247
// no manpage for this, from syscalls.master
#define __NR_nfssvc 155
/* old getdirentries 156 */
-#if (FREEBSD_VERS <= FREEBSD_10)
// these were removed in FreeBSD 11
-#define __NR_freebsd4_statfs 157
-#define __NR_freebsd4_fstatfs 158
-#endif
+//#define __NR_freebsd4_statfs 157
+//#define __NR_freebsd4_fstatfs 158
#define __NR_lgetfh 160
#define __NR_getfh 161
-#if (FREEBSD_VERS <= FREEBSD_10)
-#define __NR_freebsd4_getdomainname 162
-#define __NR_freebsd4_setdomainname 163
-#define __NR_freebsd4_uname 164
-#endif
+//#define __NR_freebsd4_getdomainname 162
+//#define __NR_freebsd4_setdomainname 163
+//#define __NR_freebsd4_uname 164
#define __NR_sysarch 165
#define __NR_rtprio 166
#define __NR_semsys 169
#define __NR_msgsys 170
#define __NR_shmsys 171
-#if (FREEBSD_VERS <= FREEBSD_10)
-#define __NR_freebsd6_pread 173
-#define __NR_freebsd6_pwrite 174
-#endif
+//#define __NR_freebsd6_pread 173
+//#define __NR_freebsd6_pwrite 174
#define __NR_setfib 175
#define __NR_ntp_adjtime 176
#define __NR_setgid 181
#else
#define __NR_getdirentries 196
#endif
-#if (FREEBSD_VERS <= FREEBSD_10)
-#define __NR_freebsd6_mmap 197
-#endif
+//#define __NR_freebsd6_mmap 197
#define __NR___syscall 198
-#if (FREEBSD_VERS <= FREEBSD_10)
-#define __NR_freebsd6_lseek 199
-#define __NR_freebsd6_truncate 200
-#define __NR_freebsd6_ftruncate 201
-#endif
+/* #define __NR_freebsd6_lseek 199 */
+/* #define __NR_freebsd6_truncate 200 */
+/* #define __NR_freebsd6_ftruncate 201 */
#define __NR___sysctl 202
#define __NR_mlock 203
#define __NR_munlock 204
#define __NR_preadv 289
#define __NR_pwritev 290
-#if (FREEBSD_VERS <= FREEBSD_10)
-#define __NR_freebsd4_fhstatfs 297
-#endif
+/* #define __NR_freebsd4_fhstatfs 297 */
#define __NR_fhopen 298
#define __NR_aio_suspend 315
#define __NR_aio_cancel 316
#define __NR_aio_error 317
-#if (FREEBSD_VERS <= FREEBSD_10)
-#define __NR_oaio_read 318
-#define __NR_oaio_write 319
-#define __NR_olio_listio 320
-#endif
+/* #define __NR_oaio_read 318 */
+/* #define __NR_oaio_write 319 */
+/* #define __NR_olio_listio 320 */
#define __NR_yield 321
/* obs thr_sleep 323 */
/* obs thr_wakeup 324 */
#define __NR_sched_get_priority_min 333
#define __NR_sched_rr_get_interval 334
#define __NR_utrace 335
-#if (FREEBSD_VERS <= FREEBSD_10)
-#define __NR_freebsd4_sendfile 342
-#endif
+/* #define __NR_freebsd4_sendfile 342 */
#define __NR_kldsym 337
#define __NR_jail 338
#define __NR_sigprocmask 340
#define __NR_sigsuspend 341
-#if (FREEBSD_VERS <= FREEBSD_10)
-#define __NR_freebsd4_sigaction 342
-#endif
+/* #define __NR_freebsd4_sigaction 342 */
#define __NR_sigpending 343
-#if (FREEBSD_VERS <= FREEBSD_10)
-#define __NR_freebsd4_sigreturn 344
-#endif
+/* #define __NR_freebsd4_sigreturn 344 */
#define __NR_sigtimedwait 345
#define __NR_sigwaitinfo 346
#define __NR___acl_get_file 347
GO(SYS_getfh, "2s 2m");
SY(SYS_getfh, x0, x0); FAIL;
-#if (FREEBSD_VERS <= FREEBSD_10)
- /* SYS_getdomainname 162 */
- GO(SYS_freebsd4_getdomainname, "2s 1m");
- SY(SYS_freebsd4_getdomainname, x0, x0); FAIL;
-
- /* SYS_setdomainname 163 */
- GO(SYS_freebsd4_setdomainname, "2s 0m");
- SY(SYS_freebsd4_setdomainname, x0, x0); FAIL;
-
- /* SYS_uname 164 */
- GO(SYS_freebsd4_uname, "1s 1m");
- SY(SYS_freebsd4_uname, x0); FAIL;
-#endif
+ /* SYS_freebsd4_getdomainname 162 */
+ /* SYS_freebsd4_setdomainname 163 */
+ /* SYS_freebsd_4uname 164 */
/* SYS_sysarch 165 */
#if defined (VGP_x86_freebsd)
SY(SYS_rtprio, x0+1, x0, x0); FAIL;
/* following 3 not implemented in OS */
-
/* SYS_semsys 169 */
-
/* SYS_msgsys 170 */
-
/* SYS_shmsys 171 */
-#if (FREEBSD_VERS <= FREEBSD_10)
-
- /* @todo PJF maybe one day */
-
/* SYS_freebsd6_pread 173 */
-
/* SYS_freebsd6_pwrite 174 */
-#endif
/* SYS_setfib 175 */
GO(SYS_setfib, "1s 0m");
// BSDXY(__NR_ntp_adjtime, sys_ntp_adjtime), // 176
/* bsd/os sfork 177 */
-
/* bsd/os getdescriptor 178 */
-
/* bsd/os setdescriptor 179 */
/* SYS_setgid, 181 */
SY(SYS_getdirentries, x0, x0, x0+3, x0+1); FAIL;
#endif
-#if (FREEBSD_VERS <= FREEBSD_10)
/* SYS_freebsd6_mmap 197*/
-#endif
/* __syscall (handled specially) 198 */
-#if (FREEBSD_VERS <= FREEBSD_10)
/* SYS_freebsd6_lseek 199 */
-
/* SYS_freebsd6_truncate 200 */
-
/* SYS_freebsd6_ftruncate 201 */
-#endif
/* SYS___sysctl 202 */
GO(SYS___sysctl, "(getoldlen) 3s 2m");
GO(SYS_thr_kill, "2s 0m");
SY(SYS_thr_kill, x0-10, x0-20); FAIL;
-#if (FREEBSD_VERS <= FREEBSD_10)
-
- /* @todo PJF (maybe) FreeBSD 10 or earlier, hmmm */
- // BSDXY(__NR__umtx_lock, sys__umtx_lock), // 434
-
- // BSDXY(__NR__umtx_unlock, sys__umtx_unlock), // 435
-#endif
+ /* SYS_freebsd10__umtx_lock 434 */
+ /* SYS_freebsd10__umtx_unlock 435 */
/* SYS_jail_attach 436 */
GO(SYS_jail_attach, "1s 0m");
// 544 is the highest syscall on FreeBSD 9
-#if (FREEBSD_VERS >= FREEBSD_10)
-
/* SYS_ppoll 545 */
GO(SYS_ppoll, "4s 2m");
SY(SYS_ppoll, x0+8, x0+1, x0+1, x0+1); FAIL;
GO(SYS_utimensat, "4s 2m");
SY(SYS_utimensat, x0+99999999, x0+1, x0+1, x0); FAIL;
-#endif // FREEBSD_VERS >= FREEBSD_11
-
#if (FREEBSD_VERS >= FREEBSD_11)
// 548 is obsolete numa_getaffinity