From 85e5ec75790d85bdac6a61dbe7a9b2cd0a413247 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 2 May 2007 19:57:05 +0000 Subject: [PATCH] Added OpenThreads wrappers --- genwrapper.conf | 16 +- src/osgWrappers/CMakeLists.txt | 1 + src/osgWrappers/OpenThreads/Barrier.cpp | 55 +++++ src/osgWrappers/OpenThreads/Block.cpp | 53 +++++ src/osgWrappers/OpenThreads/Condition.cpp | 49 +++++ src/osgWrappers/OpenThreads/Mutex.cpp | 43 ++++ .../OpenThreads/ReadWriteMutex.cpp | 69 ++++++ .../OpenThreads/ReentrantMutex.cpp | 44 ++++ src/osgWrappers/OpenThreads/Thread.cpp | 208 ++++++++++++++++++ src/osgWrappers/osg/Camera.cpp | 1 + src/osgWrappers/osg/GraphicsContext.cpp | 1 + src/osgWrappers/osg/GraphicsThread.cpp | 5 +- src/osgWrappers/osgDB/DatabasePager.cpp | 1 + src/osgWrappers/osgDB/SharedStateManager.cpp | 1 + .../osgParticle/ParticleSystem.cpp | 1 + 15 files changed, 546 insertions(+), 2 deletions(-) create mode 100644 src/osgWrappers/OpenThreads/Barrier.cpp create mode 100644 src/osgWrappers/OpenThreads/Block.cpp create mode 100644 src/osgWrappers/OpenThreads/Condition.cpp create mode 100644 src/osgWrappers/OpenThreads/Mutex.cpp create mode 100644 src/osgWrappers/OpenThreads/ReadWriteMutex.cpp create mode 100644 src/osgWrappers/OpenThreads/ReentrantMutex.cpp create mode 100644 src/osgWrappers/OpenThreads/Thread.cpp diff --git a/genwrapper.conf b/genwrapper.conf index 1261be546..80872c62e 100644 --- a/genwrapper.conf +++ b/genwrapper.conf @@ -272,7 +272,21 @@ suppress reflector "osgDB::Output" # some types are incorrectly detected as value type or object type. Here we # specify the type kind explicitly -suppress reflector "OpenThreads::Mutex" +configure reflector "OpenThreads::Mutex" + object-type +end + +configure reflector "OpenThreads::Condition" + object-type +end + +configure reflector "OpenThreads::Block" + object-type +end + +configure reflector "OpenThreads::Barrier" + object-type +end configure reflector "OpenThreads::ReentrantMutex" object-type diff --git a/src/osgWrappers/CMakeLists.txt b/src/osgWrappers/CMakeLists.txt index 9714d607c..4ea6e4208 100644 --- a/src/osgWrappers/CMakeLists.txt +++ b/src/osgWrappers/CMakeLists.txt @@ -86,6 +86,7 @@ ENDMACRO(ADD_WRAPPER_LIB) SET(OSGWRAPPER_LIB_LIST + OpenThreads osg osgDB osgUtil diff --git a/src/osgWrappers/OpenThreads/Barrier.cpp b/src/osgWrappers/OpenThreads/Barrier.cpp new file mode 100644 index 000000000..d1d307e69 --- /dev/null +++ b/src/osgWrappers/OpenThreads/Barrier.cpp @@ -0,0 +1,55 @@ +// *************************************************************************** +// +// Generated automatically by genwrapper. +// Please DO NOT EDIT this file! +// +// *************************************************************************** + +#include +#include +#include +#include + +#include + +// Must undefine IN and OUT macros defined in Windows headers +#ifdef IN +#undef IN +#endif +#ifdef OUT +#undef OUT +#endif + +BEGIN_OBJECT_REFLECTOR(OpenThreads::Barrier) + I_ConstructorWithDefaults1(IN, int, numThreads, 0, + Properties::NON_EXPLICIT, + ____Barrier__int, + "Constructor. ", + ""); + I_Method0(void, reset, + Properties::VIRTUAL, + __void__reset, + "Reset the barrier to it's original state. ", + ""); + I_MethodWithDefaults1(void, block, IN, unsigned int, numThreads, 0, + Properties::VIRTUAL, + __void__block__unsigned_int, + "Block until numThreads threads have entered the barrier. ", + ""); + I_Method0(void, release, + Properties::VIRTUAL, + __void__release, + "Release the barrier, now. ", + ""); + I_Method0(int, numThreadsCurrentlyBlocked, + Properties::VIRTUAL, + __int__numThreadsCurrentlyBlocked, + "Return the number of threads currently blocked in the barrier, Return -1 if error. ", + ""); + I_Method0(void, invalidate, + Properties::NON_VIRTUAL, + __void__invalidate, + "", + ""); +END_REFLECTOR + diff --git a/src/osgWrappers/OpenThreads/Block.cpp b/src/osgWrappers/OpenThreads/Block.cpp new file mode 100644 index 000000000..f0058dbba --- /dev/null +++ b/src/osgWrappers/OpenThreads/Block.cpp @@ -0,0 +1,53 @@ +// *************************************************************************** +// +// Generated automatically by genwrapper. +// Please DO NOT EDIT this file! +// +// *************************************************************************** + +#include +#include +#include +#include + +#include + +// Must undefine IN and OUT macros defined in Windows headers +#ifdef IN +#undef IN +#endif +#ifdef OUT +#undef OUT +#endif + +BEGIN_OBJECT_REFLECTOR(OpenThreads::Block) + I_Constructor0(____Block, + "", + ""); + I_Method0(bool, block, + Properties::NON_VIRTUAL, + __bool__block, + "", + ""); + I_Method1(bool, block, IN, unsigned long, timeout, + Properties::NON_VIRTUAL, + __bool__block__unsigned_long, + "", + ""); + I_Method0(void, release, + Properties::NON_VIRTUAL, + __void__release, + "", + ""); + I_Method0(void, reset, + Properties::NON_VIRTUAL, + __void__reset, + "", + ""); + I_Method1(void, set, IN, bool, doRelease, + Properties::NON_VIRTUAL, + __void__set__bool, + "", + ""); +END_REFLECTOR + diff --git a/src/osgWrappers/OpenThreads/Condition.cpp b/src/osgWrappers/OpenThreads/Condition.cpp new file mode 100644 index 000000000..c72204884 --- /dev/null +++ b/src/osgWrappers/OpenThreads/Condition.cpp @@ -0,0 +1,49 @@ +// *************************************************************************** +// +// Generated automatically by genwrapper. +// Please DO NOT EDIT this file! +// +// *************************************************************************** + +#include +#include +#include +#include + +#include +#include + +// Must undefine IN and OUT macros defined in Windows headers +#ifdef IN +#undef IN +#endif +#ifdef OUT +#undef OUT +#endif + +BEGIN_OBJECT_REFLECTOR(OpenThreads::Condition) + I_Constructor0(____Condition, + "Constructor. ", + ""); + I_Method1(int, wait, IN, OpenThreads::Mutex *, mutex, + Properties::VIRTUAL, + __int__wait__Mutex_P1, + "Wait on a mutex. ", + ""); + I_Method2(int, wait, IN, OpenThreads::Mutex *, mutex, IN, unsigned long int, ms, + Properties::VIRTUAL, + __int__wait__Mutex_P1__unsigned_long_int, + "Wait on a mutex for a given amount of time (ms). ", + "0 if normal, -1 if errno set, errno code otherwise. "); + I_Method0(int, signal, + Properties::VIRTUAL, + __int__signal, + "Signal a SINGLE thread to wake if it's waiting. ", + "0 if normal, -1 if errno set, errno code otherwise. "); + I_Method0(int, broadcast, + Properties::VIRTUAL, + __int__broadcast, + "Wake all threads waiting on this condition. ", + "0 if normal, -1 if errno set, errno code otherwise. "); +END_REFLECTOR + diff --git a/src/osgWrappers/OpenThreads/Mutex.cpp b/src/osgWrappers/OpenThreads/Mutex.cpp new file mode 100644 index 000000000..1a42b5718 --- /dev/null +++ b/src/osgWrappers/OpenThreads/Mutex.cpp @@ -0,0 +1,43 @@ +// *************************************************************************** +// +// Generated automatically by genwrapper. +// Please DO NOT EDIT this file! +// +// *************************************************************************** + +#include +#include +#include +#include + +#include + +// Must undefine IN and OUT macros defined in Windows headers +#ifdef IN +#undef IN +#endif +#ifdef OUT +#undef OUT +#endif + +BEGIN_OBJECT_REFLECTOR(OpenThreads::Mutex) + I_Constructor0(____Mutex, + "Constructor. ", + ""); + I_Method0(int, lock, + Properties::VIRTUAL, + __int__lock, + "Lock the mutex. ", + "0 if normal, -1 if errno set, errno code otherwise. "); + I_Method0(int, unlock, + Properties::VIRTUAL, + __int__unlock, + "Unlock the mutex. ", + "0 if normal, -1 if errno set, errno code otherwise. "); + I_Method0(int, trylock, + Properties::VIRTUAL, + __int__trylock, + "Test if mutex can be locked. ", + "0 if normal, -1 if errno set, errno code otherwise. "); +END_REFLECTOR + diff --git a/src/osgWrappers/OpenThreads/ReadWriteMutex.cpp b/src/osgWrappers/OpenThreads/ReadWriteMutex.cpp new file mode 100644 index 000000000..fc636f529 --- /dev/null +++ b/src/osgWrappers/OpenThreads/ReadWriteMutex.cpp @@ -0,0 +1,69 @@ +// *************************************************************************** +// +// Generated automatically by genwrapper. +// Please DO NOT EDIT this file! +// +// *************************************************************************** + +#include +#include +#include +#include + +#include + +// Must undefine IN and OUT macros defined in Windows headers +#ifdef IN +#undef IN +#endif +#ifdef OUT +#undef OUT +#endif + +BEGIN_OBJECT_REFLECTOR(OpenThreads::ReadWriteMutex) + I_Constructor0(____ReadWriteMutex, + "", + ""); + I_Method0(int, readLock, + Properties::VIRTUAL, + __int__readLock, + "", + ""); + I_Method0(int, readUnlock, + Properties::VIRTUAL, + __int__readUnlock, + "", + ""); + I_Method0(int, writeLock, + Properties::VIRTUAL, + __int__writeLock, + "", + ""); + I_Method0(int, writeUnlock, + Properties::VIRTUAL, + __int__writeUnlock, + "", + ""); + I_ProtectedConstructor1(IN, const OpenThreads::ReadWriteMutex &, x, + Properties::NON_EXPLICIT, + ____ReadWriteMutex__C5_ReadWriteMutex_R1, + "", + ""); +END_REFLECTOR + +BEGIN_VALUE_REFLECTOR(OpenThreads::ScopedReadLock) + I_Constructor1(IN, OpenThreads::ReadWriteMutex &, mutex, + Properties::NON_EXPLICIT, + ____ScopedReadLock__ReadWriteMutex_R1, + "", + ""); +END_REFLECTOR + +BEGIN_VALUE_REFLECTOR(OpenThreads::ScopedWriteLock) + I_Constructor1(IN, OpenThreads::ReadWriteMutex &, mutex, + Properties::NON_EXPLICIT, + ____ScopedWriteLock__ReadWriteMutex_R1, + "", + ""); +END_REFLECTOR + diff --git a/src/osgWrappers/OpenThreads/ReentrantMutex.cpp b/src/osgWrappers/OpenThreads/ReentrantMutex.cpp new file mode 100644 index 000000000..2c823b54f --- /dev/null +++ b/src/osgWrappers/OpenThreads/ReentrantMutex.cpp @@ -0,0 +1,44 @@ +// *************************************************************************** +// +// Generated automatically by genwrapper. +// Please DO NOT EDIT this file! +// +// *************************************************************************** + +#include +#include +#include +#include + +#include + +// Must undefine IN and OUT macros defined in Windows headers +#ifdef IN +#undef IN +#endif +#ifdef OUT +#undef OUT +#endif + +BEGIN_OBJECT_REFLECTOR(OpenThreads::ReentrantMutex) + I_BaseType(OpenThreads::Mutex); + I_Constructor0(____ReentrantMutex, + "", + ""); + I_Method0(int, lock, + Properties::VIRTUAL, + __int__lock, + "Lock the mutex. ", + "0 if normal, -1 if errno set, errno code otherwise. "); + I_Method0(int, unlock, + Properties::VIRTUAL, + __int__unlock, + "Unlock the mutex. ", + "0 if normal, -1 if errno set, errno code otherwise. "); + I_Method0(int, trylock, + Properties::VIRTUAL, + __int__trylock, + "Test if mutex can be locked. ", + "0 if normal, -1 if errno set, errno code otherwise. "); +END_REFLECTOR + diff --git a/src/osgWrappers/OpenThreads/Thread.cpp b/src/osgWrappers/OpenThreads/Thread.cpp new file mode 100644 index 000000000..19056aa00 --- /dev/null +++ b/src/osgWrappers/OpenThreads/Thread.cpp @@ -0,0 +1,208 @@ +// *************************************************************************** +// +// Generated automatically by genwrapper. +// Please DO NOT EDIT this file! +// +// *************************************************************************** + +#include +#include +#include +#include + +#include + +// Must undefine IN and OUT macros defined in Windows headers +#ifdef IN +#undef IN +#endif +#ifdef OUT +#undef OUT +#endif + +BEGIN_ENUM_REFLECTOR(OpenThreads::Thread::ThreadPriority) + I_EnumLabel(OpenThreads::Thread::THREAD_PRIORITY_MAX); + I_EnumLabel(OpenThreads::Thread::THREAD_PRIORITY_HIGH); + I_EnumLabel(OpenThreads::Thread::THREAD_PRIORITY_NOMINAL); + I_EnumLabel(OpenThreads::Thread::THREAD_PRIORITY_LOW); + I_EnumLabel(OpenThreads::Thread::THREAD_PRIORITY_MIN); + I_EnumLabel(OpenThreads::Thread::THREAD_PRIORITY_DEFAULT); +END_REFLECTOR + +BEGIN_ENUM_REFLECTOR(OpenThreads::Thread::ThreadPolicy) + I_EnumLabel(OpenThreads::Thread::THREAD_SCHEDULE_FIFO); + I_EnumLabel(OpenThreads::Thread::THREAD_SCHEDULE_ROUND_ROBIN); + I_EnumLabel(OpenThreads::Thread::THREAD_SCHEDULE_TIME_SHARE); + I_EnumLabel(OpenThreads::Thread::THREAD_SCHEDULE_DEFAULT); +END_REFLECTOR + +BEGIN_ABSTRACT_OBJECT_REFLECTOR(OpenThreads::Thread) + I_Constructor0(____Thread, + "Constructor. ", + ""); + I_Method0(int, getThreadId, + Properties::NON_VIRTUAL, + __int__getThreadId, + "Get a unique thread id. ", + "This id is monotonically increasing.a unique thread identifier "); + I_Method0(size_t, getProcessId, + Properties::NON_VIRTUAL, + __size_t__getProcessId, + "Get the thread's process id. ", + "This is the pthread_t or pid_t value depending on the threading model being used.thread process id. "); + I_Method0(int, start, + Properties::NON_VIRTUAL, + __int__start, + "Start the thread. ", + "This method will configure the thread, set it's priority, and spawn it.if the stack size specified setStackSize is smaller than the smallest allowable stack size, the threads stack size will be set to the minimum allowed, and may be retrieved via the getStackSize() 0 if normal, -1 if errno set, errno code otherwise. "); + I_Method0(int, startThread, + Properties::NON_VIRTUAL, + __int__startThread, + "", + ""); + I_Method0(int, testCancel, + Properties::NON_VIRTUAL, + __int__testCancel, + "Test the cancel state of the thread. ", + "If the thread has been canceled this method will cause the thread to exit now. This method operates on the calling thread.Returns 0 if normal, -1 if called from a thread other that this."); + I_Method0(int, cancel, + Properties::VIRTUAL, + __int__cancel, + "Cancel the thread. ", + "Equivalent to SIGKILL.0 if normal, -1 if errno set, errno code otherwise. "); + I_Method1(int, setSchedulePriority, IN, OpenThreads::Thread::ThreadPriority, priority, + Properties::NON_VIRTUAL, + __int__setSchedulePriority__ThreadPriority, + "Set the thread's schedule priority. ", + "This is a complex method. Beware of thread priorities when using a many-to-many kernel entity implemenation (such as IRIX pthreads). If one is not carefull to manage the thread priorities, a priority inversion deadlock can easily occur (Although the OpenThreads::Mutex & OpenThreads::Barrier constructs have been designed with this senario in mind). Unless you have explicit need to set the schedule pirorites for a given task, it is best to leave them alone.some implementations (notably LinuxThreads and IRIX Sprocs) only alow you to decrease thread priorities dynamically. Thus, a lower priority thread will not allow it's priority to be raised on the fly.seting the environment variable OUTPUT_THREADLIB_SCHEDULING_INFO will output scheduling information for each thread to stdout. 0 if normal, -1 if errno set, errno code otherwise. "); + I_Method0(int, getSchedulePriority, + Properties::NON_VIRTUAL, + __int__getSchedulePriority, + "Get the thread's schedule priority (if able). ", + "seting the environment variable OUTPUT_THREADLIB_SCHEDULING_INFO will output scheduling information for each thread to stdout. 0 if normal, -1 if errno set, errno code otherwise. "); + I_Method1(int, setSchedulePolicy, IN, OpenThreads::Thread::ThreadPolicy, policy, + Properties::NON_VIRTUAL, + __int__setSchedulePolicy__ThreadPolicy, + "Set the thread's scheduling policy (if able). ", + "On some implementations (notably IRIX Sprocs & LinuxThreads) The policy may prohibit the use of SCHEDULE_ROUND_ROBIN and SCHEDULE_FIFO policies - due to their real-time nature, and the danger of deadlocking the machine when used as super-user. In such cases, the command is a no-op.seting the environment variable OUTPUT_THREADLIB_SCHEDULING_INFO will output scheduling information for each thread to stdout. 0 if normal, -1 if errno set, errno code otherwise. "); + I_Method0(int, getSchedulePolicy, + Properties::NON_VIRTUAL, + __int__getSchedulePolicy, + "Get the thread's policy (if able). ", + "seting the environment variable OUTPUT_THREADLIB_SCHEDULING_INFO will output scheduling information for each thread to stdout. policy if normal, -1 if errno set, errno code otherwise. "); + I_Method1(int, setStackSize, IN, size_t, size, + Properties::NON_VIRTUAL, + __int__setStackSize__size_t, + "Set the thread's desired stack size (in bytes). ", + "This method is an attribute of the thread and must be called *before* the start() method is invoked.a return code of 13 (EACESS) means that the thread stack size can no longer be changed. 0 if normal, -1 if errno set, errno code otherwise. "); + I_Method0(size_t, getStackSize, + Properties::NON_VIRTUAL, + __size_t__getStackSize, + "Get the thread's desired stack size. ", + "the thread's stack size. 0 indicates that the stack size has either not yet been initialized, or not yet been specified by the application. "); + I_Method0(void, printSchedulingInfo, + Properties::NON_VIRTUAL, + __void__printSchedulingInfo, + "Print the thread's scheduling information to stdout. ", + ""); + I_Method0(int, detach, + Properties::NON_VIRTUAL, + __int__detach, + "Detach the thread from the calling process. ", + "0 if normal, -1 if errno set, errno code otherwise. "); + I_Method0(int, join, + Properties::NON_VIRTUAL, + __int__join, + "Join the calling process with the thread. ", + "0 if normal, -1 if errno set, errno code otherwise. "); + I_Method0(int, setCancelModeDisable, + Properties::NON_VIRTUAL, + __int__setCancelModeDisable, + "Disable thread cancelation altogether. ", + "Thread::cancel() has no effect.0 if normal, -1 if errno set, errno code otherwise. "); + I_Method0(int, setCancelModeAsynchronous, + Properties::NON_VIRTUAL, + __int__setCancelModeAsynchronous, + "Mark the thread to cancel aysncronously on Thread::cancel(). ", + "(May not be available with process-level implementations).0 if normal, -1 if errno set, errno code otherwise. "); + I_Method0(int, setCancelModeDeferred, + Properties::NON_VIRTUAL, + __int__setCancelModeDeferred, + "Mark the thread to cancel at the earliest convenience on Thread::cancel() (This is the default). ", + "0 if normal, -1 if errno set, errno code otherwise. "); + I_Method0(bool, isRunning, + Properties::NON_VIRTUAL, + __bool__isRunning, + "Query the thread's running status. ", + "true if running, false if not. "); + I_Method0(void, run, + Properties::PURE_VIRTUAL, + __void__run, + "Thread's run method. ", + "Must be implemented by derived classes. This is where the action happens."); + I_Method0(void, cancelCleanup, + Properties::VIRTUAL, + __void__cancelCleanup, + "Thread's cancel cleanup routine, called upon cancel(), after the cancelation has taken place, but before the thread exits completely. ", + "This method should be used to repair parts of the thread's data that may have been damaged by a pre-mature cancel. No-op by default."); + I_Method0(void *, getImplementation, + Properties::NON_VIRTUAL, + __void_P1__getImplementation, + "", + ""); + I_Method1(int, setProcessorAffinity, IN, unsigned int, cpunum, + Properties::NON_VIRTUAL, + __int__setProcessorAffinity__unsigned_int, + "Thread's processor affinity method. ", + "This binds a thread to a processor whenever possible. This call must be made before start() or startThread() and has no effect after the thread has been running. In the pthreads implementation, this is only implemented on sgi, through a pthread extension. On other pthread platforms this is ignored. Returns 0 on success, implementation's error on failure, or -1 if ignored."); + I_StaticMethod1(int, SetConcurrency, IN, int, concurrencyLevel, + __int__SetConcurrency__int_S, + "Set the concurrency level for a running application. ", + "This method only has effect if the pthreads thread model is being used, and then only when that model is many-to-one (eg. irix). in other cases it is ignored. The concurrency level is only a *hint* as to the number of execution vehicles to use, the actual implementation may do anything it wants. Setting the value to 0 returns things to their default state.previous concurrency level, -1 indicates no-op. "); + I_StaticMethod0(int, GetConcurrency, + __int__GetConcurrency_S, + "Get the concurrency level for a running application. ", + "In this case, a return code of 0 means that the application is in default mode. A return code of -1 means that the application is incapable of setting an arbitrary concurrency, because it is a one-to-one execution model (sprocs, linuxThreads)"); + I_StaticMethod0(OpenThreads::Thread *, CurrentThread, + __Thread_P1__CurrentThread_S, + "Return a pointer to the current running thread. ", + ""); + I_StaticMethod0(void, Init, + __void__Init_S, + "Initialize Threading in a program. ", + "This method must be called before you can do any threading in a program."); + I_StaticMethod0(int, YieldCurrentThread, + __int__YieldCurrentThread_S, + "Yield the processor. ", + "This method operates on the calling process. And is equivalent to calling sched_yield(). 0 if normal, -1 if errno set, errno code otherwise. "); + I_StaticMethod0(OpenThreads::Thread::ThreadPriority, GetMasterPriority, + __ThreadPriority__GetMasterPriority_S, + "This method will return the ThreadPriority of the master process. ", + "(ie, the one calling the thread->start() methods for the first time) The method will almost certainly return Thread::THREAD_PRIORITY_DEFAULT if Init() has not been called.the Thread::ThreadPriority of the master thread. "); + I_StaticMethod1(int, microSleep, IN, unsigned int, microsec, + __int__microSleep__unsigned_int_S, + "microSleep method, equivilant to the posix usleep(microsec). ", + "This is not strictly thread API but is used so often with threads. It's basically UNIX usleep. Parameter is number of microseconds we current thread to sleep. Returns 0 on succes, non-zero on failure (UNIX errno or GetLastError() will give detailed description."); + I_SimpleProperty(void *, Implementation, + __void_P1__getImplementation, + 0); + I_SimpleProperty(size_t, ProcessId, + __size_t__getProcessId, + 0); + I_SimpleProperty(unsigned int, ProcessorAffinity, + 0, + __int__setProcessorAffinity__unsigned_int); + I_SimpleProperty(OpenThreads::Thread::ThreadPolicy, SchedulePolicy, + 0, + __int__setSchedulePolicy__ThreadPolicy); + I_SimpleProperty(OpenThreads::Thread::ThreadPriority, SchedulePriority, + 0, + __int__setSchedulePriority__ThreadPriority); + I_SimpleProperty(size_t, StackSize, + __size_t__getStackSize, + __int__setStackSize__size_t); + I_SimpleProperty(int, ThreadId, + __int__getThreadId, + 0); +END_REFLECTOR + diff --git a/src/osgWrappers/osg/Camera.cpp b/src/osgWrappers/osg/Camera.cpp index 0c885d5e0..172f637b2 100644 --- a/src/osgWrappers/osg/Camera.cpp +++ b/src/osgWrappers/osg/Camera.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/src/osgWrappers/osg/GraphicsContext.cpp b/src/osgWrappers/osg/GraphicsContext.cpp index a87a2b4e8..3710a03be 100644 --- a/src/osgWrappers/osg/GraphicsContext.cpp +++ b/src/osgWrappers/osg/GraphicsContext.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/src/osgWrappers/osg/GraphicsThread.cpp b/src/osgWrappers/osg/GraphicsThread.cpp index 52ec4e5b1..9ee6793f2 100644 --- a/src/osgWrappers/osg/GraphicsThread.cpp +++ b/src/osgWrappers/osg/GraphicsThread.cpp @@ -29,6 +29,7 @@ END_REFLECTOR BEGIN_OBJECT_REFLECTOR(osg::BarrierOperation) I_BaseType(osg::Operation); + I_BaseType(OpenThreads::Barrier); I_ConstructorWithDefaults2(IN, int, numThreads, , IN, osg::BarrierOperation::PreBlockOp, op, osg::BarrierOperation::NO_OPERATION, ____BarrierOperation__int__PreBlockOp, "", @@ -36,7 +37,7 @@ BEGIN_OBJECT_REFLECTOR(osg::BarrierOperation) I_Method0(void, release, Properties::VIRTUAL, __void__release, - "if this operation is a barrier then release it. ", + "Release the barrier, now. ", ""); I_PublicMemberProperty(osg::BarrierOperation::PreBlockOp, _preBlockOp); END_REFLECTOR @@ -84,6 +85,7 @@ END_REFLECTOR BEGIN_OBJECT_REFLECTOR(osg::OperationsThread) I_BaseType(osg::Referenced); + I_BaseType(OpenThreads::Thread); I_Constructor0(____OperationsThread, "", ""); @@ -160,6 +162,7 @@ END_REFLECTOR BEGIN_OBJECT_REFLECTOR(osg::RefBlock) I_VirtualBaseType(osg::Referenced); + I_BaseType(OpenThreads::Block); I_Constructor0(____RefBlock, "", ""); diff --git a/src/osgWrappers/osgDB/DatabasePager.cpp b/src/osgWrappers/osgDB/DatabasePager.cpp index a53c123ec..a058a35e7 100644 --- a/src/osgWrappers/osgDB/DatabasePager.cpp +++ b/src/osgWrappers/osgDB/DatabasePager.cpp @@ -50,6 +50,7 @@ END_REFLECTOR BEGIN_OBJECT_REFLECTOR(osgDB::DatabasePager) I_BaseType(osg::NodeVisitor::DatabaseRequestHandler); + I_BaseType(OpenThreads::Thread); I_Constructor0(____DatabasePager, "", ""); diff --git a/src/osgWrappers/osgDB/SharedStateManager.cpp b/src/osgWrappers/osgDB/SharedStateManager.cpp index fb3038bcb..6137c26ee 100644 --- a/src/osgWrappers/osgDB/SharedStateManager.cpp +++ b/src/osgWrappers/osgDB/SharedStateManager.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/src/osgWrappers/osgParticle/ParticleSystem.cpp b/src/osgWrappers/osgParticle/ParticleSystem.cpp index f94f605f5..a9f723117 100644 --- a/src/osgWrappers/osgParticle/ParticleSystem.cpp +++ b/src/osgWrappers/osgParticle/ParticleSystem.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include #include