Writing Multithreaded Programs - Dialogic Brooktrout Digital Board Installation And Configuration Manual

Table of Contents

Advertisement

®
Dialogic
Brooktrout

Writing Multithreaded Programs

March 2013
®
Bfv API Libraries and Makefiles
The Dialogic® Brooktrout® Bfv API libraries are supplied in several
forms. 32-bit versions are always supplied, and for Solaris SPARC
version 7 and higher, there are also 64-bit versions. The primary
libraries are shared (.so) libraries. There are also static (.a) libraries;
their use is deprecated and they are supplied for compatibility only.
To compile an application with the .so libraries, the operating system
needs to find the .so libraries at runtime. The installation procedure
automatically installs these libraries into a known system locations:
(for 32-bit) and /usr/lib/sparcv9 (for 64-bit). If you
/usr/lib
are performing installation manually, you can either copy the
libraries there, or add the directories containing the .so libraries to
the environment variables LD_LIBRARY_PATH (for 32-bit) and
LD_LIBRARY_PATH_64 (for 64-bit).
The app.src and bapp.src directories contain makefiles that compile
using the 32-bit version of the Bfv API libraries. There is also a
sections of the makefile that can be uncommented to use the 64-bit
versions of the library. Follow the instructions in the makefile to
make these changes.
All applications should try to follow the makefiles supplied in the
or bapp.src directory. In particular, since all the supplied
app.src
libraries were compiled as multi threaded, compile all applications
this way. See also,
Reviewing Compiler and Linker Options on
page
70.
When developing a multithreaded program, be sure to follow the
programming guidelines described in your system documentation.
When new threads are created, often a stack size can be specified.
The stack size must be sufficiently large to store all local variables
used both by the application and the Bfv API. If the stack size is not
large enough, unpredictable behavior can result.
Dialogic usually finds a stack size of 64K to be sufficient but,
depending on the application stack allocation demands, more
memory might be required.
Special Considerations
65

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Brooktrout Digital Board and is the answer not in the manual?

Table of Contents