150c39ea7SAlexander Langer.\" -*- nroff -*- 250c39ea7SAlexander Langer.\" 350c39ea7SAlexander Langer.\" Copyright (c) 2001 Alexander Langer 450c39ea7SAlexander Langer.\" 550c39ea7SAlexander Langer.\" All rights reserved. 650c39ea7SAlexander Langer.\" 750c39ea7SAlexander Langer.\" This program is free software. 850c39ea7SAlexander Langer.\" 950c39ea7SAlexander Langer.\" Redistribution and use in source and binary forms, with or without 1050c39ea7SAlexander Langer.\" modification, are permitted provided that the following conditions 1150c39ea7SAlexander Langer.\" are met: 1250c39ea7SAlexander Langer.\" 1. Redistributions of source code must retain the above copyright 1350c39ea7SAlexander Langer.\" notice, this list of conditions and the following disclaimer. 1450c39ea7SAlexander Langer.\" 2. Redistributions in binary form must reproduce the above copyright 1550c39ea7SAlexander Langer.\" notice, this list of conditions and the following disclaimer in the 1650c39ea7SAlexander Langer.\" documentation and/or other materials provided with the distribution. 1750c39ea7SAlexander Langer.\" 1850c39ea7SAlexander Langer.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR 1950c39ea7SAlexander Langer.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2050c39ea7SAlexander Langer.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2150c39ea7SAlexander Langer.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 2250c39ea7SAlexander Langer.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2350c39ea7SAlexander Langer.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2450c39ea7SAlexander Langer.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2550c39ea7SAlexander Langer.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2650c39ea7SAlexander Langer.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2750c39ea7SAlexander Langer.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2850c39ea7SAlexander Langer.\" 2950c39ea7SAlexander Langer.\" $FreeBSD$ 3050c39ea7SAlexander Langer.\" 3150c39ea7SAlexander Langer.Dd April 27, 2001 3250c39ea7SAlexander Langer.Dt SYSCALL_MODULE 9 3350c39ea7SAlexander Langer.Os 3450c39ea7SAlexander Langer.Sh NAME 3550c39ea7SAlexander Langer.Nm SYSCALL_MODULE 3650c39ea7SAlexander Langer.Nd syscall kernel module declaration macro 3750c39ea7SAlexander Langer.Sh SYNOPSIS 38f16b3c0dSChad David.In sys/param.h 39f16b3c0dSChad David.In sys/kernel.h 4032eef9aeSRuslan Ermilov.In sys/proc.h 4132eef9aeSRuslan Ermilov.In sys/module.h 4232eef9aeSRuslan Ermilov.In sys/sysent.h 4350c39ea7SAlexander Langer.Fn SYSCALL_MODULE name "int *offset" "struct sysent new_sysent" "modeventhand_t evh" "void *arg" 4450c39ea7SAlexander Langer.Sh DESCRIPTION 4550c39ea7SAlexander LangerThe 4650c39ea7SAlexander Langer.Fn SYSCALL_MODULE 4750c39ea7SAlexander Langermacro declares a new syscall. 4850c39ea7SAlexander Langer.Fn SYSCALL_MODULE 4950c39ea7SAlexander Langerexpands into a kernel module declaration named as 5050c39ea7SAlexander Langer.Fa name . 5150c39ea7SAlexander Langer.Pp 5250c39ea7SAlexander Langer.Fa offset 5350c39ea7SAlexander Langeris a pointer to an 5450c39ea7SAlexander Langer.Vt int 5550c39ea7SAlexander Langerwhich saves the offset in 5650c39ea7SAlexander Langer.Vt "struct sysent" 5750c39ea7SAlexander Langerwhere the 5850c39ea7SAlexander Langersyscall is allocated. 5950c39ea7SAlexander Langer.Pp 6050c39ea7SAlexander Langer.Fa new_sysent 6163060b7aSAlexander Langerspecifies the function implementing the syscall and the number of 6263060b7aSAlexander Langerarguments this function needs (see 6350c39ea7SAlexander Langer.Aq Pa sys/sysent.h ) . 6450c39ea7SAlexander Langer.Pp 6550c39ea7SAlexander Langer.Fa evh 6650c39ea7SAlexander Langeris a pointer to the kernel module event handler function with the argument 6750c39ea7SAlexander Langer.Fa arg . 6850c39ea7SAlexander LangerPlease refer to 6950c39ea7SAlexander Langer.Xr module 9 7050c39ea7SAlexander Langerfor more information. 7150c39ea7SAlexander Langer.Sh EXAMPLES 7250c39ea7SAlexander LangerA minimal example for a syscall module can be found in 7350c39ea7SAlexander Langer.Pa /usr/share/examples/kld/syscall/module/syscall.c . 7450c39ea7SAlexander Langer.Sh SEE ALSO 7550c39ea7SAlexander Langer.Xr module 9 7650c39ea7SAlexander Langer.Pp 7750c39ea7SAlexander Langer.Pa /usr/share/examples/kld/syscall/module/syscall.c 7850c39ea7SAlexander Langer.Sh AUTHORS 7950c39ea7SAlexander LangerThis manual page was written by 8050c39ea7SAlexander Langer.An Alexander Langer Aq alex@FreeBSD.org . 81