opnsense-src/sys/tools/syscalls/examples/cpp/syscalls.master
Kyle Evans 53fae788f2 sys: syscalls: add a test syscall definition file
This exercises some subset of the preprocessor that would be nice to
still support.

Pull Request:	https://github.com/freebsd/freebsd-src/pull/1575
2025-02-18 22:02:19 +00:00

26 lines
479 B
Text

#include <sys/param.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
0 AUE_NULL UNIMPL unimpl_syscall0
; Scenario #1: Vendor uses a reserved slot on just a single platform
#ifdef PLATFORM_FOO
1 AUE_NULL STD {
int syscall1(
int arg1
);
}
#else
1 AUE_NULL RESERVED
#endif
; Scenario #2: The other way around; vendor obsoletes a syscall on newer
; platforms
#ifdef PLATFORM_FOO
2 AUE_NULL OBSOL syscall2
#else
2 AUE_NULL STD {
int syscall2(void);
}
#endif