annotate docs/ccguide/wait.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 9a345cb1c03a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
1 <refentry id="wait">
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
2 <refnamediv>
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
3 <refname>Wait</refname>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
4 <refpurpose>wait for task termination</refpurpose>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
5 </refnamediv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
6
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
7 <refsynopsisdiv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
8 <funcsynopsis>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
9 <funcprototype>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
10 <funcdef><function>wait</function></funcdef>
476
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
11 <paramdef>int *<parameter>status</parameter></paramdef>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
12 </funcprototype>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
13
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
14 <funcprototype>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
15 <funcdef><function>wait</function></funcdef>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
16 <paramdef><parameter>0</parameter></paramdef>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
17 </funcprototype>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
18 </funcsynopsis>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
19
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
20 </refsynopsisdiv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
21
476
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
22 <refsect1><title>Assembler Equivalent</title>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
23 <para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
24 os9 F$WAIT
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
25 </para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
26 </refsect1>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
27 <refsect1><title>Description</title>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
28 <para>
476
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
29 Wait is used to halt the current task until a child task has
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
30 terminated.
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
31 </para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
32 <para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
33 The call returns the task id of the terminating task and places
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
34 the status of that task in the integer pointed to by "status"
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
35 unless "status" is 0. A wait must be executed for each child
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
36 task spawned.
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
37 </para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
38 <para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
39 The status will contain the argument of the "exit" or "_exit"
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
40 call in the child task of the signal number if it was
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
41 interrupted. A normally terminating C program with no call to
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
42 "exit" or "_exit" has an implied call of "exit(0)".
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
43 </para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
44 </refsect1>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
45 <refsect1><title>Caveats</title>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
46 <para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
47 NOTE that the status is the OS-9 status code and is not
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
48 compatible with codes on other systems.
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
49 </para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
50 </refsect1>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
51 <refsect1><title>Diagnostics</title>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
52 <para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
53 -1 is returned if there is no child to be waited for.
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
54 </para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
55 </refsect1>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
56 <refsect1><title>See Also</title>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
57 <para>
547
9a345cb1c03a All "See Also" implemented
roug
parents: 476
diff changeset
58 <link linkend="os9fork">os9fork()</link>,
9a345cb1c03a All "See Also" implemented
roug
parents: 476
diff changeset
59 <link linkend="signal">signal()</link>,
9a345cb1c03a All "See Also" implemented
roug
parents: 476
diff changeset
60 <link linkend="exit">exit(),_exit()</link>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
61 </para>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
62 </refsect1>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
63 </refentry>