Date: Fri, 18 Mar 2016 07:59:39 +0000 (UTC) From: Julian Elischer <julian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297012 - head/share/man/man9 Message-ID: <201603180759.u2I7xdrV033126@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: julian Date: Fri Mar 18 07:59:38 2016 New Revision: 297012 URL: https://svnweb.freebsd.org/changeset/base/297012 Log: Add a few details that make it easier to use this macro. MFC after: 1 week Sponsored by: Panzura inc Modified: head/share/man/man9/SYSCALL_MODULE.9 Modified: head/share/man/man9/SYSCALL_MODULE.9 ============================================================================== --- head/share/man/man9/SYSCALL_MODULE.9 Fri Mar 18 07:13:09 2016 (r297011) +++ head/share/man/man9/SYSCALL_MODULE.9 Fri Mar 18 07:59:38 2016 (r297012) @@ -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 func .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 .
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603180759.u2I7xdrV033126>