osSyncPrintf.3p
1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.TH osSyncPrintf 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
osSyncPrintf \- do formatted printing through debug port
.SH SYNOPSIS
.nf
.Op c
#include <os.h>
.sp .8v
void osSyncPrintf(const char *format, .../* args */);
.Op
\f1
.fi
.SH DESCRIPTION
The
.I osSyncPrintf
call performs text formatting similar to the libc function
.I printf.
The text output is transmitted from the target system via the debug port
to the
.I gload
process running on the debug host workstation. The text is then written to
the stdout device (normally a shell window) of the
.I gload
process.
.PP
In order to make
.I osSyncPrintf
more efficient it is suggested that an rdb output buffer be set up first by
a call to
.I osInitRdb.
.I osSyncPrintf
requires that the interrupt service handler be functional before it is used.
Consequently, osSyncPrintf should not be called from the boot thread.
.PP
Because multiple threads can use the printing facility, it is possible for
data to be mixed as threads swap in and out. Changes effective with release
2.0f cause
.I osSyncPrintf
to have significantly less impact on game performance. In the past, a call to
.I osSyncPrintf
would cause the interrupt processing and thread swapping to stop until all data
had been transferred to the host Indy. This is no longer the case.
.PP
.SH WARNING
If large quantities of data are printed at once, it is possible to overflow
the kernel printf buffers. When this happens the system will attempt to print
a warning message to the console. If a continual stream of data is printed,
it is possible to generate enough data to cause the Indy to spend all of its
time servicing the interrupts associated with the osSyncPrintfs. When this
happens it will appear as if the Indy is frozen, since interrupts have priority
over processing user interaction. If the stream of osSyncPrintf can be stopped,
the Indy should recover and resume normal functioning.
.SH "SEE ALSO"
.IR sprintf(3S),
.IR osInitialize(3P),
.IR printf(3S),
.IR gload(1P)