Bionic Buffalo Tech Note #49: Thread Support in the
gibraltar
Object Request Broker
Bionic Buffalo Tech Note #49
Thread Support in the
gibraltar
Object Request Broker
last revised Saturday 2003.05.24
©2003 Bionic Buffalo Corporation. All Rights Reserved.
Tatanka and TOAD are trademarks of Bionic Buffalo Corporation
Introduction
The
gibraltar
object request broker (ORB) is safe under limited circumstances for use in threaded
environments. This Tech Note describes the use and limitations of threading support in
gibraltar
.
gibraltar
may be built with or without thread support. If the symbol
TBT_THREADED_LIBRARY
is defined as non-zero, then
gibraltar
will be compiled to utilize primitives from a subset of
pthreads. If
TBT_THREADED_LIBRARY
is zero, then
gibraltar
will assume a single-threaded
environment.
In its single-threaded form,
gibraltar
routines will not take any steps to protect its data structures
from improper access by simultaneously executing threads of control. Built this way, it may be used in
non-threaded environments such as DOS, or in single threaded processes in environments such as
Unix. In single-threaded mode, the pthread.h header isn't required, and it is not necessary to link with
the pthread library. The rest of this Tech Note will ignore the single-threaded option, and instead will
focus on code built with pthreads support.
When compiled with thread support,
gibraltar
is safe for use in threaded environments as follows:
gibraltar
procedures are reentrant and thread-safe, and may be called by any thread
gibraltar
procedures do not block; however, operation invocations on non-
gibraltar
objects made through
gibraltar
may block until the invocation
completes or fails, or because the object adapter's thread policy causes the method
invocation to block for other reasons
threads using
gibraltar
procedures are not cancel safe; however, a thread may be
terminated after a specified action (destruction of the thread's environment structure)
taken by the thread itself
gibraltar
procedures are not fork safe
Page 1 of 4