National Instruments 320685D-01 Drums User Manual


 
Chapter 5 UNIX Compiler/Linker Issues
©
National Instruments Corporation 5-7 LabWindows/CVI Programmer Reference Manual
You cannot use the non-ANSI C Sun compiler cc because it does not recognize some ANSI C
constructs in the header files, such as function prototypes and the keywords
const, void, and
volatile.
Locking Process Segments into Memory Using plock()
You can use the UNIX function plock to lock the text and data segments of your program
into memory. However, this function locks all segments of the LabWindows/CVI process, not
just the segments associated with your program. Also, because the text segments of
LabWindows/CVI programs actually reside in the data segment of the LabWindows/CVI
process, you must lock both text and data segments, using
plock(PROCLOCK), in order to
lock all text into memory.
Note
Your LabWindows/CVI process must have superuser privileges to use the
plock
function.
UNIX Asynchronous Signal Handling
The following signals have special meaning in LabWindows/CVI:
SIGPOLL (SIGIO) and SIGPIPE—The LabWindows/CVI TCP Library installs
signal handlers for
SIGPOLL (SIGIO) and SIGPIPE. If you use the TCP Library and you
want to install handlers for these signals, you must call the LabWindows/CVI handlers
when your handlers are called. If you attempt to set the signal handler to
SIG_DFL for
these signals while running in the LabWindows/CVI environment, LabWindows/CVI
restores its own handlers.
SIGINT and SIGQUIT—Normally, the operating system generates these two signals
when you type certain keystrokes (<Ctrl-C> and <Ctrl-\>) in the window from which
you invoke LabWindows/CVI. If one of these signals occurs while your program is
running and you have not installed a handler for it, LabWindows/CVI suspends
your program the next time it calls a function that processes events (such as
ProcessSystemEvents). If your program does not call any event-processing
functions, it continues to run.
SIGTERM—LabWindows/CVI treats
SIGTERM as a stronger version of SIGINT and
SIGQUIT. If this signal occurs while your program is running and you have not installed
a handler for it, LabWindows/CVI terminates the program, gives you a chance to save
your files, and exits. If
SIGTERM occurs when no program is running, LabWindows/CVI
exits immediately.
SIGBUS, SIGFPE, SIGILL, and SIGSEGV—These signals exist to allow for
hardware exceptions. Because execution cannot continue beyond the instruction that
caused the exception, LabWindows/CVI always catches these signals. If this signal
occurs while your program is running, LabWindows/CVI reports a fatal run-time error
00ProRef.book : 06chap05.fm Page 7 Monday, March 9, 1998 3:23 PM