[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 02/05: Merge branch 'maint'
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 02/05: Merge branch 'maint' |
Date: |
Fri, 25 Apr 2014 16:44:46 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit 566d8578955c0e94de17aea98de2f5f753d6b67d
Merge: d78d1ce 2db3dc7
Author: Tom Rondeau <address@hidden>
Date: Fri Apr 25 10:17:23 2014 -0400
Merge branch 'maint'
docs/doxygen/other/logger.dox | 2 +-
gnuradio-runtime/include/gnuradio/thread/thread.h | 8 +-
gnuradio-runtime/lib/thread/thread.cc | 38 +-
gr-audio/lib/osx/circular_buffer.h | 15 +-
gr-audio/lib/osx/osx_sink.cc | 820 ++++++++++++----------
gr-audio/lib/osx/osx_sink.h | 2 +-
gr-channels/lib/flat_fader_impl.cc | 2 +-
7 files changed, 502 insertions(+), 385 deletions(-)
diff --cc gnuradio-runtime/include/gnuradio/thread/thread.h
index 6cd84ae,5149e21..f646ab6
--- a/gnuradio-runtime/include/gnuradio/thread/thread.h
+++ b/gnuradio-runtime/include/gnuradio/thread/thread.h
@@@ -142,16 -142,9 +142,12 @@@ namespace gr
*/
GR_RUNTIME_API int thread_priority(gr_thread_t thread);
- /*! \brief get current thread priority for a given thread ID
- *
- * Note: this does not work on OSX
+ /*! \brief set current thread priority for a given thread ID
*/
GR_RUNTIME_API int set_thread_priority(gr_thread_t thread, int priority);
+
+ GR_RUNTIME_API void set_thread_name(gr_thread_t thread,
+ std::string name);
} /* namespace thread */
} /* namespace gr */
diff --cc gnuradio-runtime/lib/thread/thread.cc
index 53eb23b,1b3ebe5..8c59b6d
--- a/gnuradio-runtime/lib/thread/thread.cc
+++ b/gnuradio-runtime/lib/thread/thread.cc
@@@ -200,25 -164,27 +200,33 @@@ namespace gr
// Not implemented on OSX
}
- int
+ int
thread_priority(gr_thread_t thread)
{
- // Not implemented on OSX
- return -1;
+ sched_param param;
+ int priority;
+ int policy;
+ int ret;
+ ret = pthread_getschedparam (thread, &policy, ¶m);
+ priority = param.sched_priority;
+ return (ret==0)?priority:ret;
}
-
- int
+
+ int
set_thread_priority(gr_thread_t thread, int priority)
{
- // Not implemented on OSX
- return -1;
+ int policy;
+ struct sched_param param;
+ pthread_getschedparam (thread, &policy, ¶m);
+ param.sched_priority = priority;
+ return pthread_setschedparam(thread, policy, ¶m);
}
+
+ void
+ set_thread_name(gr_thread_t thread, std::string name)
+ {
+ // Not implemented on OSX
+ }
} /* namespace thread */
} /* namespace gr */
- [Commit-gnuradio] [gnuradio] branch master updated (3831dd3 -> 754cfa7), git, 2014/04/25
- [Commit-gnuradio] [gnuradio] 02/05: Merge branch 'maint',
git <=
- [Commit-gnuradio] [gnuradio] 04/05: Merge branch 'master' of git.gnuradio.org:gnuradio, git, 2014/04/25
- [Commit-gnuradio] [gnuradio] 05/05: Merge branch 'maint', git, 2014/04/25
- [Commit-gnuradio] [gnuradio] 03/05: Merge branch 'maint', git, 2014/04/25
- [Commit-gnuradio] [gnuradio] 01/05: qtgui: adding a trigger for the constellation plots. Probably most useful with tags, but normal and auto triggering supported, too., git, 2014/04/25