diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2013-05-12 09:46:25 +1000 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2013-05-12 09:46:25 +1000 |
commit | 792302fbdfa37cf680234353dbe973886c4b2898 (patch) | |
tree | e999bcf6dbfe12cf19ae49b1762cd71d724aa8ae /cmake/Modules/GrMiscUtils.cmake | |
parent | a7adf4689b58d91bd88d0dc948b017e1d42bff01 (diff) | |
parent | 9851f2377d099ffe72312375e7f761f66b664aa6 (diff) |
Merge branch 'next' into runtime_pimpl
Catches up runtime_pimpl branch with changes on next since
the initial branch start.
Conflicts:
gnuradio-runtime/include/gnuradio/constants.h
gnuradio-runtime/include/gnuradio/tags.h
gnuradio-runtime/include/gr_block_detail.h
gnuradio-runtime/include/gr_buffer.h
gnuradio-runtime/lib/CMakeLists.txt
gnuradio-runtime/lib/gr_block.cc
gnuradio-runtime/lib/gr_block_detail.cc
gnuradio-runtime/lib/gr_block_executor.cc
gnuradio-runtime/lib/gr_buffer.cc
gnuradio-runtime/lib/gr_realtime.cc
gr-blocks/lib/interleaved_short_to_complex_impl.cc
Diffstat (limited to 'cmake/Modules/GrMiscUtils.cmake')
-rw-r--r-- | cmake/Modules/GrMiscUtils.cmake | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/cmake/Modules/GrMiscUtils.cmake b/cmake/Modules/GrMiscUtils.cmake index 69ff1f5ddc..3803fba0b1 100644 --- a/cmake/Modules/GrMiscUtils.cmake +++ b/cmake/Modules/GrMiscUtils.cmake @@ -317,3 +317,31 @@ function(GRCC) set(PYFILES ${pyfiles} PARENT_SCOPE) endfunction(GRCC) + +######################################################################## +# Check if HAVE_PTHREAD_SETSCHEDPARAM and HAVE_SCHED_SETSCHEDULER +# should be defined +######################################################################## +macro(GR_CHECK_LINUX_SCHED_AVAIL) +set(CMAKE_REQUIRED_LIBRARIES -lpthread) + CHECK_CXX_SOURCE_COMPILES(" + #include <pthread.h> + int main(){ + pthread_t pthread; + pthread_setschedparam(pthread, 0, 0); + return 0; + } " HAVE_PTHREAD_SETSCHEDPARAM + ) + GR_ADD_COND_DEF(HAVE_PTHREAD_SETSCHEDPARAM) + + CHECK_CXX_SOURCE_COMPILES(" + #include <sched.h> + int main(){ + pid_t pid; + sched_setscheduler(pid, 0, 0); + return 0; + } " HAVE_SCHED_SETSCHEDULER + ) + GR_ADD_COND_DEF(HAVE_SCHED_SETSCHEDULER) +endmacro(GR_CHECK_LINUX_SCHED_AVAIL) + |