doc/documentation/manual-pages/ja/man9/SYSCALL_MODULE.9
Sergio Carlavilla Delgado 989d921f5d Migrate doc to Hugo/AsciiDoctor
I'm very pleased to announce the release of
our new website and documentation using
the new toolchain with Hugo and AsciiDoctor.

To get more information about the new toolchain
please read the FreeBSD Documentation Project Primer[1],
Hugo docs[2] and AsciiDoctor docs[3].

Acknowledgment:
Benedict Reuschling <bcr@>
Glen Barber <gjb@>
Hiroki Sato <hrs@>
Li-Wen Hsu <lwhsu@>
Sean Chittenden <seanc@>
The FreeBSD Foundation

[1] https://docs.FreeBSD.org/en/books/fdp-primer/
[2] https://gohugo.io/documentation/
[3] https://docs.asciidoctor.org/home/

Approved by:    doceng, core
2021-01-26 00:31:29 +01:00

88 lines
2.7 KiB
Groff

.\" -*- nroff -*-
.\"
.\" Copyright (c) 2001 Alexander Langer
.\"
.\" All rights reserved.
.\"
.\" This program is free software.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" %FreeBSD: src/share/man/man9/SYSCALL_MODULE.9,v 1.5.4.1 2005/01/10 23:45:00 keramida Exp %
.\"
.\" $FreeBSD$
.Dd January 7, 2005
.Dt SYSCALL_MODULE 9
.Os
.Sh 名称
.Nm SYSCALL_MODULE
.Nd syscall カーネルモジュール宣言マクロ
.Sh 書式
.In sys/param.h
.In sys/kernel.h
.In sys/proc.h
.In sys/module.h
.In sys/sysent.h
.Fn SYSCALL_MODULE name "int *offset" "struct sysent new_sysent" "modeventhand_t evh" "void *arg"
.Sh 解説
.Fn SYSCALL_MODULE
マクロは新しい syscall を宣言します。
.Fn SYSCALL_MODULE
.Fa name
という名前のカーネルモジュールの宣言に展開されます。
.Pp
このマクロで要求される残りの引数は以下の通りです。
.Bl -tag -width ".Fa new_sysent"
.It Fa offset
syscall が割り付ける
.Vt "struct sysent"
中のオフセットを保存する
.Vt int
へのポインタ。
.It Fa new_sysent
syscall を実装する関数およびこの関数が必要とする引数の数
.In ( sys/sysent.h
参照)。
.It Fa evh
引数
.Fa arg
を取るカーネルモジュールのイベントハンドラ関数へのポインタ。
詳細については
.Xr module 9
を参照してください。
.It Fa arg
それが呼び出されるとき、
.Fa evh
イベントハンドラのコールバック関数へ渡される引数。
.El
.Sh 使用例
syscall モジュールのための最低限の例が、
.Pa /usr/share/examples/kld/syscall/module/syscall.c
の中に見つけられます。
.Sh 関連項目
.Xr module 9
.Pp
.Pa /usr/share/examples/kld/syscall/module/syscall.c
.Sh 作者
このマニュアルページは
.An Alexander Langer Aq alex@FreeBSD.org
によって書かれました。