summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2016-12-02 06:27:14 +0000
committerjulian <julian@FreeBSD.org>2016-12-02 06:27:14 +0000
commite97cd1e272f9d4ccd24b2efefa6c93a62a72f615 (patch)
treefa8b99fe0c4f9ebfea772eb550310a8ced3c7a94 /share
parente71ec6347aeb2f3e9562d6b7528651ccaf1d7d84 (diff)
downloadFreeBSD-src-e97cd1e272f9d4ccd24b2efefa6c93a62a72f615.zip
FreeBSD-src-e97cd1e272f9d4ccd24b2efefa6c93a62a72f615.tar.gz
MFH: r297012
Add a few details that make it easier to use this macro. Sponsored by: Panzura inc
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/SYSCALL_MODULE.913
1 files changed, 13 insertions, 0 deletions
diff --git a/share/man/man9/SYSCALL_MODULE.9 b/share/man/man9/SYSCALL_MODULE.9
index 973adeb..00eb42b 100644
--- a/share/man/man9/SYSCALL_MODULE.9
+++ b/share/man/man9/SYSCALL_MODULE.9
@@ -57,6 +57,8 @@ A pointer to an
which saves the offset in
.Vt "struct sysent"
where the syscall is allocated.
+If the location pointed to by offset holds a non 0 number it will be used if possible.
+If it holds 0 then one will be assigned.
.It Fa new_sysent
is a pointer to a structure that specifies the function implementing
the syscall and the number of arguments this function needs (see
@@ -72,6 +74,17 @@ The argument passed to the callback functions of the
.Fa evh
event handler when it is called.
.El
+.Pp
+The syscall number assigned to the module can be retrieved using the
+.Xr modstat 3
+and
+.Xr modfind 3
+library functions in libc.
+The MACRO
+.Fn SYSCALL_MODULE_HELPER
+includes
+.Fn SYSCALL_MODULE
+and much of its boilerplate code.
.Sh EXAMPLES
A minimal example for a syscall module can be found in
.Pa /usr/share/examples/kld/syscall/module/syscall.c .
OpenPOWER on IntegriCloud