Chapter Contents |
Previous |
Next |
Coprocessing Functions |
This feature enables you to implement a SAS/C program
as several cooperative processes, or coprocesses. Each coprocess
represents a single thread of sequential execution. Only one thread is allowed
to execute at any particular time. Control is transferred from one coprocess
to another using the
cocall
and
coreturn
functions;
these functions also provide for the transfer of data between coprocesses.
At the start of execution, a main coprocess is created automatically by the
library. Additional coprocesses are created during execution using the
costart
function and are terminated
via the
coexit
function
so that the coprocess structure of a program is completely dynamic. Most
of the data structures of a SAS/C program are shared among all coprocesses,
including
extern
variables,
storage allocated by
malloc
,
and open files. (The structures that are not shared are listed later in this
section.)
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.