Hi Nick,

On 6 May 2014 16:25, Trajce Nikolov NICK <trajce.nikolov.n...@gmail.com> wrote:
> I spent few hours on this and I have things to report. First, there are code
> mods I did to fix it actually, but, there is a comment like "// Must protect
> linux from realtime.", PThread.cpp around ln: 323. I have mods to submit but
> can not do that yet since there are issue with the config. Seam like these
> are not getting defined on my 64bit Ubuntu (I am not a config guru so I need
> help from others on this): __linux, __linux__,
> HAVE_THREE_PARAM_SCHED_SETAFFINITY, HAVE_TWO_PARAM_SCHED_SETAFFINITY ...
> etc. and all of these that should be set from the pthreads/CMakeLists.txt
> but are not. Also ALLOW_PRIORITY_SCHEDULING is not set at all. I had to hard
> code these defines to make it work but someone need to look in the
> configuration of pthread or at least give some hints so I can dig into

CMake should be automatically detecting these features, the following
OpenSceneGraph/src/OpenThreads/pthreads/CMakeLists.txt portion should
be doing this:


     CHECK_FUNCTION_EXISTS(pthread_yield HAVE_PTHREAD_YIELD)
..
    CHECK_FUNCTION_EXISTS(pthread_getconcurrency HAVE_PTHREAD_GETCONCURRENCY)
 ..
     CHECK_FUNCTION_EXISTS(pthread_setconcurrency HAVE_PTHREAD_SETCONCURRENCY)
..
    CHECK_FUNCTION_EXISTS(pthread_setaffinity_np
HAVE_PTHREAD_SETAFFINITY_NP)

For these to pass then functions pthread_yield,
pthread_getconcurrency, pthread_setconcurrency and
pthread_setaffinity_np will need to be present in the system
pthreads.h header.

If you run  make VERBOSE=1 you should see the -D entries assocated
with these cmake variables.  What I see on my system when I do this
is:

Building CXX object
src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/__/common/Atomic.o
cd /home/robert/OpenSceneGraph/src/OpenThreads/pthreads &&
/usr/bin/c++   -DHAVE_PTHREAD_CANCEL -DHAVE_PTHREAD_SETCANCELSTATE
-DHAVE_PTHREAD_TESTCANCEL -DHAVE_SCHED_YIELD
-DHAVE_THREE_PARAM_SCHED_SETAFFINITY -DOPENTHREADS_EXPORTS
-DOpenThreads_EXPORTS -D_GNU_SOURCE -Wall -Wparentheses -Wno-long-long
-Wno-import -pedantic -Wreturn-type -Wmissing-braces -Wunknown-pragmas
-Wunused -O3 -DNDEBUG -fPIC -I/home/robert/OpenSceneGraph/include
-o CMakeFiles/OpenThreads.dir/__/common/Atomic.o -c
/home/robert/OpenSceneGraph/src/OpenThreads/common/Atomic.cpp
Linking CXX shared library ../../../lib/libOpenThreads.so

What do you get if you do a build with VEROSE=1?


Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to