Mercurial > hg > Members > kono > nitros9-code
view docs/ccguide/chap3.chapter @ 1331:0a3500c747de
Fixed ANOTHER bug
author | boisy |
---|---|
date | Sun, 07 Sep 2003 00:53:51 +0000 |
parents | 86139e126926 |
children |
line wrap: on
line source
<chapter> <title>C System Calls</title> <para> This section of the C compiler manual is a guide to the system calls available from C programs. </para> <para> It is <emphasis>not</emphasis> intended as a definitive description of OS-9 service requests as these are described in the OS-9 System Programmer's Manual. However, for most calls, enough information is available here to enable the programmer to write systems calls into programs without looking further. </para> <para> The names used for the system calls are chosen so that programs transported from other machines or operating systems should compile and run with as little modification as possible. However, care should be taken as the parameters and returned values of some calls may not be compatible with those on other systems. Programmers that are already familiar with OS-9 names and values should take particular care. Some calls do not share the same names as the OS-9 assembly language equivalents. The assembly language equivalent call is shown, where there is one, on the relevant page of the C call description, and a cross-reference list is provided for those already familiar with OS-9 calls. </para> <para> The normal error indication on return from a system call is a returned value of -1. The relevant error will be found in the predefined int "errno". Errno always contains the error from the last erroneous system call. Definitions for the errors for inclusion in the programs are in "<errno.h>". </para> <para> In the "See Also" sections on the following pages, unless otherwise stated, the references are to other system calls. </para> <para> Where "#include" files are shown, it is not mandatory to include them, but it might be convenient to use the manifest constants defined in them rather than integers; it certainly makes for more readable programs. </para> &abortref; &absref; &accessref; &chainref; &chdirref; &chmodref; &chownref; &closeref; &crcref; &creatref; &defdriveref; &dupref; &exitref; &getpidref; &getstatref; &getuidref; &interceptref; &killref; &lseekref; &mknodref; &modloadref; &munlinkref; &os9ref; &openref; &os9forkref; &pauseref; &prerrref; &readref; &sbrkref; &setprref; &setimeref; &setuidref; &setstatref; &signalref; &stacksizeref; &strassref; &tsleepref; &unlinkref; &waitref; &writeref; </chapter>