man u++ (Commandes) - uC++ Translator and Concurrency Runtime System
NAME
u++ - uC++ Translator and Concurrency Runtime System
SYNOPSIS
u++ [-option [...]] [filename [...]]
DESCRIPTION
The u++ command compiles uC++ and C++ source files and links C++ object files named on the command line.
The u++ command introduces a translator pass over the specified source files after the C preprocessor and before the actual C++ compilation. The translator converts several new uC++ constructs into C++ statements. The u++ command also provides the runtime concurrency library, which must be linked with each uC++ application.
The command line options depend on the particular C++ compiler used. The default compiler is the GNU C++ compiler, and the AT&T compiler will be supported shortly. As with most C compilers, the output is sent to the file a.out(5) unless the -o option is present on the command line. See the reference pages for g++(1) and CC(1) for more information.
OPTIONS
When multiple conflicting options appear on the command line, e.g., -yield followed by -noyield, the last option takes precedence. All of the options available to the C++ compiler are available to u++, plus the following:
- -debug
- The program is linked with the debug version of the unikernel or multikernel. The debug version performs runtime checks to help during the debugging phase of a uC++ program, but slows the execution. This option is the default.
- -nodebug
- The program is linked with the non-debug version of the unikernel or multikernel. No runtime checks are performed, so errors usually result in abnormal program termination.
- -yield
- When the program is translated, a random number of context switches occur at the beginning of each member routine so that during execution on a uniprocessor, there is a better simulation of parallelism. This option is in addition to random context switching due to time slicing. The extra yields of execution help during the debugging phase of a uC++ program, but slows the execution of the program.
- -noyield
- Context switches are not inserted in member routines. This option is the default.
- -verify
- When the program is translated, a check to verify that the stack has not overflowed occurs at the beginning of each member routine. Verifying the stack has not overflowed is important during the debugging phase of a uC++ program, but slows its execution.
- -noverify
- Stack overflow checks are not inserted in member routines. This option is the default.
- -multi
- The program is linked with the multikernel. See the uC++ RUNTIME KERNELS section below.
- -nomulti
- The program is linked with the unikernel. This is the default. See the uC++ RUNTIME KERNELS section below.
- -quiet
- The uC++ compilation message is not printed at the beginning of a compilation.
- -noquiet
- The uC++ compilation message is printed at the beginning of a compilation. This option is the default.
- -U++
- Only the C preprocessor and the uC++ translator are performed and the transformed program is written to stdout. This makes it possible to examine the code generated by the uC++ translator.
- -compiler path-name
- The path-name of the compiler used to compile the uC++ program(s) named on the command line. This option allows C++ compilers other than the default C++ compiler to be used to compile a uC++ program using u++. Currently, only the GNU C++ compiler is supported.
- -cpp path-name
- The path-name of the C preprocessor used to preprocess the uC++ program. This option allows a preprocessor other than the default GNU C++ preprocessor to be used to preprocess a uC++ program.
uC++ RUNTIME KERNELS
There are two versions of the uC++ kernel: the unikernel, which is designed to use a single processor, and the multikernel, which is designed to use several processors. Thus, the unikernel is sensibly used on systems with a single hardware processor or nonshared memory; the multikernel is sensibly used on systems that have multiple hardware processors and that permit memory to be shared among OS threads (eg. UNIX processes). The table below shows the situations where each kernel can be used. The unikernel can be used in a system with multiple hardware processors and shared memory but does not take advantage of either of these capabilities. The multikernel can be used on a system with a single hardware processor and shared memory but performs less efficiently than the unikernel because it uses multi-processor mutual exclusion unnecessarily.
+-----------+-------------------------+ |Non-shared | Shared | | Memory | Memory | +----------+-----------+-------------------------+ |Single |uni: yes |uni: yes | |Processor |multi: no |multi: yes (inefficient) | +----------+-----------+-------------------------+ |Multiple |uni: yes |uni: yes (no parallelism)| |Processors|multi: no |multi: yes | +----------+-----------+-------------------------+
TRANSLATOR VARIABLES
When programs are compiled using u++, the following variables are available during preprocessing. These variables allow conditional compilation of programs that must work differently in these situations.
- __U_CPLUSPLUS__
- is always available during preprocessing.
- __U_DEBUG__
- is available if the -debug compilation option is specified.
- __U_YIELD__
- is available if the -yield compilation option is specified.
- __U_VERIFY__
- is available if the -verify compilation option is specified.
- __U_INLINE__
- is available if the -inline compilation option is specified.
- __U_MULTI__
- is available if the -multi compilation option is specified.
FILES
file.{cc,C} uC++ source file
file.s assembly language file
file.o object file
//lib/ run time libraries
//bin/ translator
//inc/ header files
//doc/ reference manual and license
SEE ALSO
a.out(4), CC(1), g++(1), cpp(1)
uC++ Annotated Reference Manual
Understanding Control Flow with Concurrent Programming using uC++
REFERENCES
uC++: Concurrency in the Object-Oriented Language C++, by P.A. Buhr, G. Ditchfield, R.A. Stroobosscher, B.M. Younger, C.R. Zarnke; Software-Practise and Experience, 22(2):137--172, February 1992. This paper describes uC++ v2.0, which has been significantly extended. See the uC++ Annotated Reference Manual for the most up-to-date features.
BUGS
Bugs should be reported to usystem@plg.UWaterloo.ca.
COPYRIGHT
This library is covered under the GNU Lesser General Public License.
AUTHORS
Peter A. Buhr (pabuhr@plg.UWaterloo.ca) and many others, Programming Languages Group, University of Waterloo, Ontario, Canada, N2L 3G1. Manual pages prepared by Murray S. Kucherawy.