.\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" 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. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. .\" .\" @(#)syscall.2 8.1 (Berkeley) 6/16/93 .\" .\" .\" 2002-03-20 Christoph Hellwig .\" - adopted for Linux .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH SYSCALL 2 "14 août 2012" Linux "Manuel du programmeur Linux" .SH NOM syscall \- appel système indirect .SH SYNOPSIS .nf \fB#define _GNU_SOURCE\fP /* Consultez feature_test_macros(7) */ \fB#include \fP \fB#include \fP/* Pour les définitions de SYS_xxx */ \fBint syscall(int \fP\fInuméro\fP\fB, ...);\fP .fi .SH DESCRIPTION \fBsyscall\fP() est une petite fonction de bibliothèque qui invoque l'appel système dont l'interface en assembleur a le \fInuméro\fP indiqué avec les arguments donnés. L'utilisation de \fBsyscall\fP() est pratique, par exemple, pour invoquer un appel système qui n'a pas de fonction autour de cet appel système dans la bibliothèque\ C. \fBsyscall\fP() sauve les registres du processeur avant de faire l'appel système, restaure les registres au retour de l'appel système et stocke tous les codes d'erreur renvoyés par l'appel système dans \fBerrno\fP(3) en cas d'erreur. Les constantes symboliques correspondant aux appels système sont dans le fichier d'en\-tête \fI\fP. .SH "VALEUR RENVOYÉE" La valeur de retour est définie par l'appel système invoqué. En général, une valeur de retour nulle indique une réussite. Une valeur de retour de \-1 indique une erreur, et un code d'erreur est fourni dans \fIerrno\fP. .SH NOTES \fBsyscall\fP() est apparu dans BSD\ 4. .SH EXEMPLE .nf #define _GNU_SOURCE #include #include #include int main(int argc, char *argv[]) { pid_t tid; tid = syscall(SYS_gettid); tid = syscall(SYS_tgkill, getpid(), tid); } .fi .SH "VOIR AUSSI" \fB_syscall\fP(2), \fBintro\fP(2), \fBsyscalls\fP(2) .SH COLOPHON Cette page fait partie de la publication 3.44 du projet \fIman\-pages\fP Linux. Une description du projet et des instructions pour signaler des anomalies peuvent être trouvées à l'adresse . .SH TRADUCTION Depuis 2010, cette traduction est maintenue à l'aide de l'outil po4a par l'équipe de traduction francophone au sein du projet perkamon . .PP Thierry Vignaud (2002), Alain Portal \ (2006). Julien Cristau et l'équipe francophone de traduction de Debian\ (2006-2009). .PP Veuillez signaler toute erreur de traduction en écrivant à ou par un rapport de bogue sur le paquet \fBmanpages\-fr\fR. .PP Vous pouvez toujours avoir accès à la version anglaise de ce document en utilisant la commande «\ \fBman\ \-L C\fR \fI
\fR\ \fI\fR\ ».