Dialogic
Brooktrout
®
Writing Multithreaded Programs
March 2013
Bfv API Libraries and Makefiles
®
The Dialogic® Brooktrout® Bfv API libraries are supplied in several
forms for the appropriate Linux versions. The primary libraries are
shared (.so) libraries. In addition, there are static (.a) libraries; their
use is deprecated and are supplied for compatibility only.
To run an application compiled 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
location: /usr/lib and /usr/lib64 . If you are performing installation
manually, you can either copy the libraries there, or add the
directory locations containing the .so libraries to the environment
variable LD_LIBRARY_PATH.
Follow the makefiles supplied in the app.src or bapp.src directory for
all applications. In particular, since all the supplied libraries were
compiled as multithreaded, compile all your applications this way.
See also,
Reviewing Compiler and Linker Options on page
The Bfv API supports multithreaded programs using the pthreads
package. 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's stack allocation demands, more
memory might be required.
Special Considerations
48.
45
Need help?
Do you have a question about the Brooktrout Digital Board and is the answer not in the manual?
Questions and answers