Mercurial > hg > Members > kono > nitros9-code
changeset 602:42b2c775f05f
All refentries finished.
author | roug |
---|---|
date | Fri, 15 Nov 2002 21:49:51 +0000 |
parents | 8b8736b66631 |
children | e9578f62b346 |
files | docs/ccguide/kill.refentry docs/ccguide/lseek.refentry docs/ccguide/mknod.refentry docs/ccguide/mktemp.refentry docs/ccguide/modload.refentry docs/ccguide/open.refentry docs/ccguide/os9.refentry docs/ccguide/os9fork.refentry |
diffstat | 8 files changed, 151 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/docs/ccguide/kill.refentry Fri Nov 15 21:49:51 2002 +0000 +++ b/docs/ccguide/kill.refentry Fri Nov 15 21:49:51 2002 +0000 @@ -20,7 +20,24 @@ <refsect1><title>Description</title> <para> -Placeholder +Kill sends the interrupt type "interrupt" to the task with id +"tid". +</para> +<para> +Both tasks, sender and receiver, must have the same user id +unless the user is the super user. +</para> +<para> +The include file contains definitions of the defined signals as +follows: +<programlisting> + /* OS-9 signals */ +#define SIGKILL 0 /* system abort (cannot be caught or ignored)*/ +#define SIGWAKE 1 /* wake up */ +#define SIGQUIT 2 /* keyboard abort */ +#define SIGINT 3 /* keyboard interrupt */ +</programlisting> +Other user-defined signals may, of course, be sent. </para> </refsect1>
--- a/docs/ccguide/lseek.refentry Fri Nov 15 21:49:51 2002 +0000 +++ b/docs/ccguide/lseek.refentry Fri Nov 15 21:49:51 2002 +0000 @@ -24,7 +24,40 @@ <refsect1><title>Description</title> <para> -Placeholder +The read or write pointer for the open file with the path +number, "pn", is positioned by lseek to the specified place in +the file. The "type" indicates from where "position" is to be +measured: if 0, from the beginning of the file, if 1, from the +current location, or if 2, from the end of the file. +</para> +<para> +Seeking to a location beyond the end of a file open for +writing and then writing to it, creates a "hole" in the file +which appears to be filled with zeros from the previous end to +the position sought. +</para> +<para> +The returned value is the resulting position in the file unless +there is an error, so to find out the current position use +<informalexample> +<para> +lseek(pn,0l,1); +</para> +</informalexample> +</para> +</refsect1> + +<refsect1><title>Caveats</title> +<para> +The argument "position" <emphasis>must</emphasis> be a long integer. Constants +should be explicitly made long by appending an "l", as above, +and other types should be converted using a cast: +<informalexample> +<para> +e.g. lseek(pn,(long)pos,1); +</para> +</informalexample> +Notice also, that the return value from lseek is itself a long integer. </para> </refsect1>
--- a/docs/ccguide/mknod.refentry Fri Nov 15 21:49:51 2002 +0000 +++ b/docs/ccguide/mknod.refentry Fri Nov 15 21:49:51 2002 +0000 @@ -26,9 +26,26 @@ <refsect1><title>Description</title> <para> -Placeholder +This call may be used to create a new directory. "Fname" +should point to a string containing the desired name of the +directory. "Desc" is a descriptor specifying the desired mode +(file type) and permissions of the new file. +</para> +<para> +The include file defines the possible values for "desc" as +follows: </para> +<programlisting> +#define S_IREAD 0x01 /* owner read */ +#define S_IWRITE 0x02 /* owner write */ +#define S_IEXEC 0x04 /* owner execute */ +#define S_IOREAD 0x08 /* public read */ +#define S_IOWRITE 0x10 /* public write */ +#define S_IOEXEC 0x20 /* public execute */ +#define S_ISHARE 0x40 /* sharable */ +</programlisting> </refsect1> + <refsect1><title>Diagnostics</title> <para> Zero is returned if the directory has been successfully made; @@ -36,4 +53,9 @@ </para> </refsect1> +<refsect1><title>See Also</title> +<para> +OS-9 command "makdir" +</para> +</refsect1> </refentry>
--- a/docs/ccguide/mktemp.refentry Fri Nov 15 21:49:51 2002 +0000 +++ b/docs/ccguide/mktemp.refentry Fri Nov 15 21:49:51 2002 +0000 @@ -16,7 +16,19 @@ <refsect1><title>Description</title> <para> -Placeholder +Mktemp may be used to ensure that the name of a temporary file +is unique in the system and does not clash with any other file +name. +</para> +<para> +"Name" must point to a string whose last five characters are "X"; +the Xs will be replaced with the ascii representation of +the task id. +</para> +<para> +For example, if "name" points to "foo.XXXXX", and the task id +is 351, the returned value points at the same place, but it +now holds "foo.351". </para> </refsect1>
--- a/docs/ccguide/modload.refentry Fri Nov 15 21:49:51 2002 +0000 +++ b/docs/ccguide/modload.refentry Fri Nov 15 21:49:51 2002 +0000 @@ -38,7 +38,22 @@ <refsect1><title>Description</title> <para> -Placeholder +Each of these calls return a pointer to an OS-9 memory module. +</para> +<para> +Modlink will search the module directory for a module with the +same name as "modname" and, if found, increment its link count. +</para> +<para> +Modload will open the file which has the path list specified by +"filename" and loads modules from the file adding them to the +module directory. The returned value is a pointer to the first +module loaded. +</para> +<para> +Above, each is shown as returning a pointer to an executable +module, but it will return a pointer to whatever type of module +is found. </para> </refsect1>
--- a/docs/ccguide/open.refentry Fri Nov 15 21:49:51 2002 +0000 +++ b/docs/ccguide/open.refentry Fri Nov 15 21:49:51 2002 +0000 @@ -23,7 +23,19 @@ <refsect1><title>Description</title> <para> -Placeholder +This call opens an existing file for reading if "mode" is 1, +writing if "mode" is 2, or reading and writing if "mode" is 3. +NOTE that these values are OS-9 specific and not compatible +with other systems. "Fname" should point to a string +representing the pathname of the file. +</para> +<para> +Open returns an integer as "path number" which should be used +by i/o system calls referring to the file. +</para> +<para> +The position where reads or writes start is at the beginning of +the file. </para> </refsect1>
--- a/docs/ccguide/os9.refentry Fri Nov 15 21:49:51 2002 +0000 +++ b/docs/ccguide/os9.refentry Fri Nov 15 21:49:51 2002 +0000 @@ -20,7 +20,25 @@ <refsect1><title>Description</title> <para> -Placeholder +_os9 enables a programmer to access virtually any OS-9 system +call directly from a C program without having to resort to +assembly language routines. +</para> +<para> +<varname>Code</varname> is one of the codes that are defines in os9.h. os9.h +contains codes for the F$ and I$ function/service requests, and +it also contains getstt, setstt, and error codes. +</para> +<para> +The input registers(reg) for the system calls are accessed by +the following structure that is defined in os9.h: +<programlisting> +struct registers { + char rg_cc,rg_a,rg_b,rg_dp; + unsigned rg_x,rg_y,rg_u; +}; +</programlisting> +An example program that uses _os9 is presented on the following page. </para> </refsect1>
--- a/docs/ccguide/os9fork.refentry Fri Nov 15 21:49:51 2002 +0000 +++ b/docs/ccguide/os9fork.refentry Fri Nov 15 21:49:51 2002 +0000 @@ -27,7 +27,21 @@ <refsect1><title>Description</title> <para> -Placeholder +The action of F$FORK is desribed fully in the OS-9 System +Programmer's Manual. Os9fork will create a process that will +run concurrently with the calling process. When the forked +process terminates, it will return to the calling process. +</para> +<para> +"Modname" should point to the name of the desired module. +"Paramsize" is the length of the parameter string which should +normally be terminated with a '\n', and "paramptr" points to +the parameter string. "Type" is the module type as found in +the header(normally 1: program), and "lang" should match the +language nibble in the module header (C programs have 1 for +6809 machine code here). "Datasize" may be zero, or it may +contain the number of 256 byte pages to give to the new process +as initial allocation of memory. </para> </refsect1> <refsect1><title>Diagnostics</title>