view docs/ccguide/os9fork.refentry @ 2772:0a3f4d8ea6d5

Found ENDC in wrong location in dwread.asm and dwwrite.asm. Corrected. Moved the native 6309 code in dwread.asm and dwwrite.asm into the H6309 labeled area and changed IFEQ H6309 to IFNE H6309. Also moved the 57600bps 6809 code to the default location. This change had been done in the old dwread.asm and dwwrite.asm files to make it easier to follow. Though these two files were overwritten from the HDBDOS project dwread.asm and dwwrite.asm files. So this conversion needed to be done again so it made the source easier to follow.
author drencor-xeen
date Wed, 23 Jan 2013 12:36:55 -0600
parents 42b2c775f05f
children
line wrap: on
line source

<refentry id="os9fork">
<refnamediv>
<refname>Os9fork</refname>
<refpurpose>create a process</refpurpose>
</refnamediv>

<refsynopsisdiv>
<funcsynopsis>
<funcprototype>
  <funcdef><function>os9fork</function></funcdef>
  <paramdef>char *<parameter>modname</parameter></paramdef>
  <paramdef>int <parameter>paramsize</parameter></paramdef>
  <paramdef>char *<parameter>paramptr</parameter></paramdef>
  <paramdef>int <parameter>type</parameter></paramdef>
  <paramdef>int <parameter>lang</parameter></paramdef>
  <paramdef>int <parameter>datasize</parameter></paramdef>
</funcprototype>
</funcsynopsis>

</refsynopsisdiv>

<refsect1><title>Assembler Equivalent</title>
<para>
os9 F$FORK
</para>
</refsect1>

<refsect1><title>Description</title>
<para>
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>
<para>
-1 will be returned on error, or the ID number of the child
process will be returned on success.
</para>
</refsect1>

</refentry>