From owner-svn-src-all@freebsd.org Fri Dec 2 06:27:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A940C6214C; Fri, 2 Dec 2016 06:27:15 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2ECE91CEC; Fri, 2 Dec 2016 06:27:15 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uB26REfw053822; Fri, 2 Dec 2016 06:27:14 GMT (envelope-from julian@FreeBSD.org) Received: (from julian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uB26REdP053821; Fri, 2 Dec 2016 06:27:14 GMT (envelope-from julian@FreeBSD.org) Message-Id: <201612020627.uB26REdP053821@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: julian set sender to julian@FreeBSD.org using -f From: Julian Elischer Date: Fri, 2 Dec 2016 06:27:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r309395 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2016 06:27:15 -0000 Author: julian Date: Fri Dec 2 06:27:14 2016 New Revision: 309395 URL: https://svnweb.freebsd.org/changeset/base/309395 Log: MFH: r297012 Add a few details that make it easier to use this macro. Sponsored by: Panzura inc Modified: stable/10/share/man/man9/SYSCALL_MODULE.9 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/SYSCALL_MODULE.9 ============================================================================== --- stable/10/share/man/man9/SYSCALL_MODULE.9 Fri Dec 2 06:15:59 2016 (r309394) +++ stable/10/share/man/man9/SYSCALL_MODULE.9 Fri Dec 2 06:27:14 2016 (r309395) @@ -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 .