* Support has been added for FreeBSD 14 and FreeBSD 15.
* Add support for the folllowing FreeBSD system calls:
- close_range, kqueuex, timerfd_create, timerfd_settime and
- timerfd_gettime (all added in FreeBSD 15).
+ close_range, kqueuex, membarrier, timerfd_create,
+ timerfd_settime and timerfd_gettime (all added in FreeBSD 15).
* ==================== TOOL CHANGES ===================
#if (FREEBSD_VERS >= FREEBSD_15)
DECL_TEMPLATE(freebsd, sys_kqueuex); // 583
-// unimpl __NR_membarrier 584
+DECL_TEMPLATE(freebsd, sys_membarrier); // 584
DECL_TEMPLATE(freebsd, sys_timerfd_create); // 585
DECL_TEMPLATE(freebsd, sys_timerfd_gettime); // 586
DECL_TEMPLATE(freebsd, sys_timerfd_settime); // 587
}
}
-// SYS_membarrier 584 unimpl
+// SYS_membarrier 584
+// syscalls.master
+// int membarrier(int cmd, unsigned flags, int cpu_id);
+PRE(sys_membarrier)
+{
+ // cmd is signed int but the constants in the headers
+ // are hex so print in hex
+ PRINT("sys_membarrier(%#" FMT_REGWORD "x, %#" FMT_REGWORD "x, %" FMT_REGWORD "d)",
+ ARG1, ARG2, SARG3);
+ PRE_REG_READ3(int, "membarrier", int, cmd, unsigned, flags, int, cpu_id);
+}
// SYS_timerfd_create 585
// int timerfd_create(int clockid, int flags);
#endif
#if (FREEBSD_VERS >= FREEBSD_15)
- BSDXY( __NR_kqueuex, sys_kqueuex), // 583
- // unimpl __NR_membarrier 584
+ BSDXY(__NR_kqueuex, sys_kqueuex), // 583
+ BSDX_(__NR_membarrier, sys_membarrier), // 584
BSDXY(__NR_timerfd_create, sys_timerfd_create), // 585
BSDXY(__NR_timerfd_settime, sys_timerfd_settime), // 586
BSDXY(__NR_timerfd_gettime, sys_timerfd_gettime), // 587
SY(SYS_kqueuex, x0+123); FAIL;
/* SYS_membarrier 584 */
- /* unimpl */
+ GO(SYS_membarrier, " 3s 0m");
+ SY(SYS_membarrier, x0+123, x0+456, x0+789); FAIL;
/* SYS_timerfd_create 585 */
GO(SYS_timerfd_create, " 2s 0m");
Syscall param kqueuex(flags) contains uninitialised byte(s)
...
+---------------------------------------------------------
+584: SYS_membarrier 3s 0m
+---------------------------------------------------------
+Syscall param membarrier(cmd) contains uninitialised byte(s)
+ ...
+
+Syscall param membarrier(flags) contains uninitialised byte(s)
+ ...
+
+Syscall param membarrier(cpu_id) contains uninitialised byte(s)
+ ...
+
---------------------------------------------------------
585: SYS_timerfd_create 2s 0m
---------------------------------------------------------