ooc  1.3c
Object Oriented tollkit fo ANSI C
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Multithreading support.

The ooc library has multithreaded and a single threaded versions.

The single threaded versions does not include any trheading support, so it is faster if you do not need using threads.
The multithreaded libraries are built on the native threading mechanism of the platform.


The following libraries are generated:

Library name Description
libooc.a Multithreaded release version
libooc_st.a Singlethreaded release version
libooc_d.a Multithreaded debug version
libooc_st_d.a Singlethreaded debug version
You must take care linking against the right library, because there is no mechanism preventing wrong linkeage! All symbols can be found in each libraries.

Linking against ooc libraries.

To link against the right ooc libraries you must use the following linker options.

Library name GCC Linker flags VC++ Linker flags
libooc -pthread or
/MT or /MD
libooc_st - /MT or /MD
(/ML is depreciated)
libooc_d -g3
-pthread or -fopenmp
/MTd or /MDd
libooc_st_d - /MTd or /MDd
(/MLd is depreciated)

Compiling the ooc library.

This section is useful only if you want to compile the ooc libraries without the supplied autotools or project files. For compiling the ooc libraries you should use the following settings and predefined macros. (e.g. when you compile your code with the ooc sorce code together)
Version GCC flags VC++ flags
Multithreaded version -pthread
Singlethreaded version -DNO_THREADS NO_THREADS
Debug version -O0 -g3
Release version -DNDEBUG -O2 -g0 NDEBUG

Mix the flags as needed!

Threading primitives in ooc.

You should use the ooc threading primitives only for the development of the ooc itself! For example modifying the core or adding new container classes, etc. ooc defines some threading primitives that should be used in the ooc code itself. These are limited to the locking / unlocking mutexes. Forking and thread creation is not part of the ooc system, you should use it in your own code with the native threading libraries or with a generalized solution (e.g. OpenMP).

The following threading primitives are available:

See Also
Threading primitive definitions.