commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r8916 - in gnuradio/branches/features/mp-sched: . conf


From: eb
Subject: [Commit-gnuradio] r8916 - in gnuradio/branches/features/mp-sched: . config gnuradio-core/src/lib gnuradio-core/src/lib/runtime gnuradio-core/src/tests gnuradio-examples/python/mp-sched gr-pager/src gruel/src/include/gruel gruel/src/lib mblock/src/lib pmt/src/lib usrp/host/apps usrp/host/apps-inband usrp/host/lib/inband
Date: Thu, 17 Jul 2008 08:27:05 -0600 (MDT)

Author: eb
Date: 2008-07-17 08:26:51 -0600 (Thu, 17 Jul 2008)
New Revision: 8916

Added:
   gnuradio/branches/features/mp-sched/README.building-boost-1.35
   gnuradio/branches/features/mp-sched/config/ax_boost_asio.m4
   gnuradio/branches/features/mp-sched/config/ax_boost_base.m4
   gnuradio/branches/features/mp-sched/config/ax_boost_date_time.m4
   gnuradio/branches/features/mp-sched/config/ax_boost_filesystem.m4
   gnuradio/branches/features/mp-sched/config/ax_boost_iostreams.m4
   gnuradio/branches/features/mp-sched/config/ax_boost_program_options.m4
   gnuradio/branches/features/mp-sched/config/ax_boost_python.m4
   gnuradio/branches/features/mp-sched/config/ax_boost_regex.m4
   gnuradio/branches/features/mp-sched/config/ax_boost_serialization.m4
   gnuradio/branches/features/mp-sched/config/ax_boost_signals.m4
   gnuradio/branches/features/mp-sched/config/ax_boost_system.m4
   gnuradio/branches/features/mp-sched/config/ax_boost_test_exec_monitor.m4
   gnuradio/branches/features/mp-sched/config/ax_boost_thread.m4
   gnuradio/branches/features/mp-sched/config/ax_boost_unit_test_framework.m4
   gnuradio/branches/features/mp-sched/config/ax_boost_wserialization.m4
   gnuradio/branches/features/mp-sched/config/gr_lib64.m4
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_block_executor.cc
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_block_executor.h
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler.cc
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler.h
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler_sts.cc
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler_sts.h
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler_tpb.cc
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler_tpb.h
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_tpb_detail.cc
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_tpb_detail.h
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_tpb_thread_body.cc
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_tpb_thread_body.h
   
gnuradio/branches/features/mp-sched/gnuradio-examples/python/mp-sched/synthetic.py
   gnuradio/branches/features/mp-sched/gr-pager/src/pager_utils.py
   
gnuradio/branches/features/mp-sched/gruel/src/include/gruel/thread_body_wrapper.h
   gnuradio/branches/features/mp-sched/gruel/src/include/gruel/thread_group.h
   gnuradio/branches/features/mp-sched/gruel/src/lib/thread_body_wrapper.cc
   gnuradio/branches/features/mp-sched/gruel/src/lib/thread_group.cc
Removed:
   gnuradio/branches/features/mp-sched/config/gr_x86_64.m4
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler_thread.cc
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler_thread.h
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_top_block_impl_sts.cc
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_top_block_impl_sts.h
Modified:
   gnuradio/branches/features/mp-sched/Makefile.common
   gnuradio/branches/features/mp-sched/config/Makefile.am
   gnuradio/branches/features/mp-sched/config/acx_pthread.m4
   gnuradio/branches/features/mp-sched/config/grc_gnuradio_core.m4
   gnuradio/branches/features/mp-sched/configure-cell-cross
   gnuradio/branches/features/mp-sched/configure.ac
   gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/Makefile.am
   gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/Makefile.am
   gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_block.cc
   gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_block.h
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_block_detail.h
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_buffer.cc
   gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_buffer.h
   gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_buffer.i
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_flat_flowgraph.cc
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_flat_flowgraph.h
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_flowgraph.h
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.cc
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_top_block.cc
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_top_block_impl.cc
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_top_block_impl.h
   
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/qa_gr_buffer.cc
   gnuradio/branches/features/mp-sched/gnuradio-core/src/tests/Makefile.am
   gnuradio/branches/features/mp-sched/gr-pager/src/Makefile.am
   gnuradio/branches/features/mp-sched/gr-pager/src/__init__.py
   gnuradio/branches/features/mp-sched/gr-pager/src/usrp_flex.py
   gnuradio/branches/features/mp-sched/gr-pager/src/usrp_flex_all.py
   gnuradio/branches/features/mp-sched/gr-pager/src/usrp_flex_band.py
   gnuradio/branches/features/mp-sched/gruel/src/include/gruel/Makefile.am
   gnuradio/branches/features/mp-sched/gruel/src/lib/Makefile.am
   gnuradio/branches/features/mp-sched/mblock/src/lib/Makefile.am
   gnuradio/branches/features/mp-sched/pmt/src/lib/Makefile.am
   gnuradio/branches/features/mp-sched/run_tests.sh.in
   gnuradio/branches/features/mp-sched/usrp/host/apps-inband/Makefile.am
   gnuradio/branches/features/mp-sched/usrp/host/apps/Makefile.am
   gnuradio/branches/features/mp-sched/usrp/host/lib/inband/Makefile.am
Log:
Merged eb/sched-wip -r8734:8915 into features/mp-sched.
This branch contains a working MP-aware scheduler.


Modified: gnuradio/branches/features/mp-sched/Makefile.common
===================================================================
--- gnuradio/branches/features/mp-sched/Makefile.common 2008-07-17 13:52:07 UTC 
(rev 8915)
+++ gnuradio/branches/features/mp-sched/Makefile.common 2008-07-17 14:26:51 UTC 
(rev 8916)
@@ -105,7 +105,7 @@
 
 # This used to be set in configure.ac but is now defined here for all 
 # Makefiles when this fragment is included.
-STD_DEFINES_AND_INCLUDES=$(DEFINES) $(OMNITHREAD_INCLUDES) 
$(GNURADIO_INCLUDES) $(BOOST_CFLAGS)
+STD_DEFINES_AND_INCLUDES=$(DEFINES) $(OMNITHREAD_INCLUDES) 
$(GNURADIO_INCLUDES) $(BOOST_CPPFLAGS)
 
 # Fix for BSD make not defining $(RM).  We define it now in configure.ac
 # using AM_PATH_PROG, but now here have to add a -f to be like GNU make

Added: gnuradio/branches/features/mp-sched/README.building-boost-1.35
===================================================================
--- gnuradio/branches/features/mp-sched/README.building-boost-1.35              
                (rev 0)
+++ gnuradio/branches/features/mp-sched/README.building-boost-1.35      
2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,39 @@
+Until boost 1.35 (or later) ships with the distributions, you'll need
+to download and build it yourself.  It's not hard, and it can
+peacefully coexist with earlier versions of boost.
+
+Download the latest version of boost 1.35 from boost.sourceforge.net.
+(boost_1_35_0.tar.bz2 was the latest when this was written)
+
+unpack it somewhere
+cd into the resulting directory
+
+$ cd boost_1_35_0
+
+# Pick a prefix to install it into.  I used /opt/boost_1_35_0
+
+$ BOOST_PREFIX=/opt/boost_1_35_0
+
+$ ./configure --prefix=$BOOST_PREFIX --with-libraries=thread,date_time
+$ make
+$ make install
+
+# Done!  That was easy!
+
+----------------------------------------------------------------
+
+Now, tell gnuradio where to find it:
+
+N.B., if you have an earlier version of boost installed in one of the
+system directory paths, under Linux -- and maybe other systems --
+you'll need to export LD_LIBRARY_PATH.
+
+$ export LD_LIBRARY_PATH=$BOOST_PREFIX/lib
+
+$ cd <path-to-top-of-gnuradio-tree>
+$ ./bootstrap
+$ ./configure --with-boost=$BOOST_PREFIX  # plus whatever config args you 
usually use
+
+$ make && make check
+$ sudo make install
+

Modified: gnuradio/branches/features/mp-sched/config/Makefile.am
===================================================================
--- gnuradio/branches/features/mp-sched/config/Makefile.am      2008-07-17 
13:52:07 UTC (rev 8915)
+++ gnuradio/branches/features/mp-sched/config/Makefile.am      2008-07-17 
14:26:51 UTC (rev 8916)
@@ -27,6 +27,21 @@
 # List your m4 macros here
 m4macros = \
        acx_pthread.m4 \
+       ax_boost_asio.m4 \
+       ax_boost_base.m4 \
+       ax_boost_date_time.m4 \
+       ax_boost_filesystem.m4 \
+       ax_boost_iostreams.m4 \
+       ax_boost_program_options.m4 \
+       ax_boost_python.m4 \
+       ax_boost_regex.m4 \
+       ax_boost_serialization.m4 \
+       ax_boost_signals.m4 \
+       ax_boost_system.m4 \
+       ax_boost_test_exec_monitor.m4 \
+       ax_boost_thread.m4 \
+       ax_boost_unit_test_framework.m4 \
+       ax_boost_wserialization.m4 \
        bnv_have_qt.m4 \
        cppunit.m4 \
        gr_boost.m4 \
@@ -64,6 +79,7 @@
        gr_doxygen.m4 \
        gr_fortran.m4 \
        gr_gprof.m4 \
+       gr_lib64.m4 \
        gr_libgnuradio_core_extra_ldflags.m4 \
        gr_no_undefined.m4 \
        gr_omnithread.m4 \
@@ -75,7 +91,6 @@
        gr_subversion.m4 \
        gr_swig.m4 \
        gr_sysv_shm.m4 \
-       gr_x86_64.m4 \
        lf_cc.m4 \
        lf_cxx.m4 \
        lf_warnings.m4 \

Modified: gnuradio/branches/features/mp-sched/config/acx_pthread.m4
===================================================================
--- gnuradio/branches/features/mp-sched/config/acx_pthread.m4   2008-07-17 
13:52:07 UTC (rev 8915)
+++ gnuradio/branches/features/mp-sched/config/acx_pthread.m4   2008-07-17 
14:26:51 UTC (rev 8916)
@@ -1,6 +1,84 @@
-dnl Available from the GNU Autoconf Macro Archive at:
-dnl http://www.gnu.org/software/ac-archive/htmldoc/acx_pthread.html
-dnl
+# ===========================================================================
+#              http://autoconf-archive.cryp.to/acx_pthread.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+#
+# DESCRIPTION
+#
+#   This macro figures out how to build C programs using POSIX threads. It
+#   sets the PTHREAD_LIBS output variable to the threads library and linker
+#   flags, and the PTHREAD_CFLAGS output variable to any special C compiler
+#   flags that are needed. (The user can also force certain compiler
+#   flags/libs to be tested by setting these environment variables.)
+#
+#   Also sets PTHREAD_CC to any special C compiler that is needed for
+#   multi-threaded programs (defaults to the value of CC otherwise). (This
+#   is necessary on AIX to use the special cc_r compiler alias.)
+#
+#   NOTE: You are assumed to not only compile your program with these flags,
+#   but also link it with them as well. e.g. you should link with
+#   $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
+#
+#   If you are only building threads programs, you may wish to use these
+#   variables in your default LIBS, CFLAGS, and CC:
+#
+#          LIBS="$PTHREAD_LIBS $LIBS"
+#          CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+#          CC="$PTHREAD_CC"
+#
+#   In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
+#   has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
+#   (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+#
+#   ACTION-IF-FOUND is a list of shell commands to run if a threads library
+#   is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
+#   is not found. If ACTION-IF-FOUND is not specified, the default action
+#   will define HAVE_PTHREAD.
+#
+#   Please let the authors know if this macro fails on any platform, or if
+#   you have any other suggestions or comments. This macro was based on work
+#   by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
+#   from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
+#   Alejandro Forero Cuervo to the autoconf macro repository. We are also
+#   grateful for the helpful feedback of numerous users.
+#
+# LAST MODIFICATION
+#
+#   2008-04-12
+#
+# COPYLEFT
+#
+#   Copyright (c) 2008 Steven G. Johnson <address@hidden>
+#
+#   This program is free software: you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation, either version 3 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Macro Archive. When you make and
+#   distribute a modified version of the Autoconf Macro, you may extend this
+#   special exception to the GPL to apply to your modified version as well.
+
 AC_DEFUN([ACX_PTHREAD], [
 AC_REQUIRE([AC_CANONICAL_HOST])
 AC_LANG_SAVE
@@ -37,9 +115,10 @@
 
 # Create a list of thread flags to try.  Items starting with a "-" are
 # C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all.
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
 
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads 
-mthreads pthread --thread-safe -mt"
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads 
-mthreads pthread --thread-safe -mt pthread-config"
 
 # The ordering *is* (sometimes) important.  Some notes on the
 # individual items follow:
@@ -56,21 +135,23 @@
 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
 #      doesn't hurt to check since this sometimes defines pthreads too;
 #      also defines -D_REENTRANT)
+#      ... -mt is also the pthreads flag for HP/aCC
 # pthread: Linux, etcetera
 # --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
 
 case "${host_cpu}-${host_os}" in
         *solaris*)
 
         # On Solaris (at least, for some versions), libc contains stubbed
         # (non-functional) versions of the pthreads routines, so link-based
-        # tests will erroneously succeed.  (We need to link with -pthread or
+        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
         # a function called by this macro, so we could check for that, but
         # who knows whether they'll stub that too in a future libc.)  So,
         # we'll just look for -pthreads and -lpthread first:
 
-        acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
+        acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
         ;;
 esac
 
@@ -87,6 +168,13 @@
                 PTHREAD_CFLAGS="$flag"
                 ;;
 
+               pthread-config)
+               AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
+               if test x"$acx_pthread_config" = xno; then continue; fi
+               PTHREAD_CFLAGS="`pthread-config --cflags`"
+               PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config 
--libs`"
+               ;;
+
                 *)
                 AC_MSG_CHECKING([for the pthreads library -l$flag])
                 PTHREAD_LIBS="-l$flag"
@@ -133,43 +221,40 @@
         save_CFLAGS="$CFLAGS"
         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 
-        # Detect AIX lossage: threads are created detached by default
-        # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
-        AC_MSG_CHECKING([for joinable pthread attribute])
-        AC_TRY_LINK([#include <pthread.h>],
-                    [int attr=PTHREAD_CREATE_JOINABLE;],
-                    ok=PTHREAD_CREATE_JOINABLE, ok=unknown)
-        if test x"$ok" = xunknown; then
-                AC_TRY_LINK([#include <pthread.h>],
-                            [int attr=PTHREAD_CREATE_UNDETACHED;],
-                            ok=PTHREAD_CREATE_UNDETACHED, ok=unknown)
+        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+       AC_MSG_CHECKING([for joinable pthread attribute])
+       attr_name=unknown
+       for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+           AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
+                        [attr_name=$attr; break])
+       done
+        AC_MSG_RESULT($attr_name)
+        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+            AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
+                               [Define to necessary symbol if this constant
+                                uses a non-standard name on your system.])
         fi
-        if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
-                AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok,
-                          [Define to the necessary symbol if this constant
-                           uses a non-standard name on your system.])
-        fi
-        AC_MSG_RESULT(${ok})
-        if test x"$ok" = xunknown; then
-                AC_MSG_WARN([we do not know how to create joinable pthreads])
-        fi
 
         AC_MSG_CHECKING([if more special flags are required for pthreads])
         flag=no
         case "${host_cpu}-${host_os}" in
-                *-aix* | *-freebsd*)     flag="-D_THREAD_SAFE";;
-                *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+            *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
+            *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
         esac
         AC_MSG_RESULT(${flag})
         if test "x$flag" != xno; then
-                PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
         fi
 
         LIBS="$save_LIBS"
         CFLAGS="$save_CFLAGS"
 
-        # More AIX lossage: must compile with cc_r
-        AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
+        # More AIX lossage: must compile with xlc_r or cc_r
+       if test x"$GCC" != xyes; then
+          AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
+        else
+          PTHREAD_CC=$CC
+       fi
 else
         PTHREAD_CC="$CC"
 fi

Copied: gnuradio/branches/features/mp-sched/config/ax_boost_asio.m4 (from rev 
8915, gnuradio/branches/developers/eb/sched-wip/config/ax_boost_asio.m4)
===================================================================
--- gnuradio/branches/features/mp-sched/config/ax_boost_asio.m4                 
        (rev 0)
+++ gnuradio/branches/features/mp-sched/config/ax_boost_asio.m4 2008-07-17 
14:26:51 UTC (rev 8916)
@@ -0,0 +1,111 @@
+# ===========================================================================
+#             http://autoconf-archive.cryp.to/ax_boost_asio.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_BOOST_ASIO
+#
+# DESCRIPTION
+#
+#   Test for Asio library from the Boost C++ libraries. The macro requires a
+#   preceding call to AX_BOOST_BASE. Further documentation is available at
+#   <http://randspringer.de/boost/index.html>.
+#
+#   This macro calls:
+#
+#     AC_SUBST(BOOST_ASIO_LIB)
+#
+#   And sets:
+#
+#     HAVE_BOOST_ASIO
+#
+# LAST MODIFICATION
+#
+#   2008-04-12
+#
+# COPYLEFT
+#
+#   Copyright (c) 2008 Thomas Porschberg <address@hidden>
+#   Copyright (c) 2008 Pete Greenwell <address@hidden>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_ASIO],
+[
+    AC_ARG_WITH([boost-asio],
+    AS_HELP_STRING([--with-boost-asio@<:@=special-lib@:>@],
+                   [use the ASIO library from boost - it is possible to 
specify a certain library for the linker
+                        e.g. --with-boost-asio=boost_system-gcc41-mt-1_34 ]),
+        [
+        if test "$withval" = "no"; then
+            want_boost="no"
+        elif test "$withval" = "yes"; then
+            want_boost="yes"
+            ax_boost_user_asio_lib=""
+        else
+            want_boost="yes"
+            ax_boost_user_asio_lib="$withval"
+        fi
+        ],
+        [want_boost="yes"]
+    )
+
+    if test "x$want_boost" = "xyes"; then
+        AC_REQUIRE([AC_PROG_CC])
+        CPPFLAGS_SAVED="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+        export CPPFLAGS
+
+        LDFLAGS_SAVED="$LDFLAGS"
+        LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+        export LDFLAGS
+
+        AC_CACHE_CHECK(whether the Boost::ASIO library is available,
+                       ax_cv_boost_asio,
+        [AC_LANG_PUSH([C++])
+         AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[ @%:@include <boost/asio.hpp>
+                                            ]],
+                                  [[
+
+                                    boost::asio::io_service io;
+                                    boost::system::error_code timer_result;
+                                    boost::asio::deadline_timer t(io);
+                                    t.cancel();
+                                    io.run_one();
+                                    return 0;
+                                   ]]),
+                             ax_cv_boost_asio=yes, ax_cv_boost_asio=no)
+         AC_LANG_POP([C++])
+        ])
+        if test "x$ax_cv_boost_asio" = "xyes"; then
+           AC_LANG_PUSH([C++])
+            AC_DEFINE(HAVE_BOOST_ASIO,,[define if the Boost::ASIO library is 
available])
+            BN=boost_system
+            if test "x$ax_boost_user_asio_lib" = "x"; then
+                for ax_lib in $BN $BN-$CC $BN-$CC-mt $BN-$CC-mt-s $BN-$CC-s \
+                              lib$BN lib$BN-$CC lib$BN-$CC-mt lib$BN-$CC-mt-s 
lib$BN-$CC-s \
+                              $BN-mgw $BN-mgw $BN-mgw-mt $BN-mgw-mt-s 
$BN-mgw-s ; do
+                    AC_CHECK_LIB($ax_lib, main, [BOOST_ASIO_LIB="-l$ax_lib" 
AC_SUBST(BOOST_ASIO_LIB) link_thread="yes" break],
+                                 [link_thread="no"])
+                done
+            else
+               for ax_lib in $ax_boost_user_asio_lib 
$BN-$ax_boost_user_asio_lib; do
+                      AC_CHECK_LIB($ax_lib, main,
+                                   [BOOST_ASIO_LIB="-l$ax_lib" 
AC_SUBST(BOOST_ASIO_LIB) link_asio="yes" break],
+                                   [link_asio="no"])
+                  done
+
+            fi
+            if test "x$link_asio" = "xno"; then
+                AC_MSG_ERROR(Could not link against $ax_lib !)
+            fi
+           AC_LANG_POP([C++])
+        fi
+
+        CPPFLAGS="$CPPFLAGS_SAVED"
+        LDFLAGS="$LDFLAGS_SAVED"
+    fi
+])

Copied: gnuradio/branches/features/mp-sched/config/ax_boost_base.m4 (from rev 
8915, gnuradio/branches/developers/eb/sched-wip/config/ax_boost_base.m4)
===================================================================
--- gnuradio/branches/features/mp-sched/config/ax_boost_base.m4                 
        (rev 0)
+++ gnuradio/branches/features/mp-sched/config/ax_boost_base.m4 2008-07-17 
14:26:51 UTC (rev 8916)
@@ -0,0 +1,224 @@
+# ===========================================================================
+#             http://autoconf-archive.cryp.to/ax_boost_base.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_BOOST_BASE([MINIMUM-VERSION])
+#
+# DESCRIPTION
+#
+#   Test for the Boost C++ libraries of a particular version (or newer)
+#
+#   If no path to the installed boost library is given the macro searchs
+#   under /usr, /usr/local, /opt and /opt/local and evaluates the
+#   $BOOST_ROOT environment variable. Further documentation is available at
+#   <http://randspringer.de/boost/index.html>.
+#
+#   This macro calls:
+#
+#     AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS)
+#
+#   And sets:
+#
+#     HAVE_BOOST
+#
+# LAST MODIFICATION
+#
+#   2008-04-12
+#
+# COPYLEFT
+#
+#   Copyright (c) 2008 Thomas Porschberg <address@hidden>
+#   Copyright (c) 2008 Free Software Foundation, Inc.
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_BASE],
+[
+AC_REQUIRE([GR_LIB64])
+AC_ARG_WITH([boost],
+    AS_HELP_STRING([--with-boost@<:@=DIR@:>@],
+                  [use boost (default is yes) - it is possible to specify the 
root directory for boost (optional)]),
+    [
+    if test "$withval" = "no"; then
+        want_boost="no"
+    elif test "$withval" = "yes"; then
+        want_boost="yes"
+        ac_boost_path=""
+    else
+        want_boost="yes"
+        ac_boost_path="$withval"
+    fi
+    ],
+    [want_boost="yes"])
+
+
+AC_ARG_WITH([boost-libdir],
+        AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
+                      [Force given directory for boost libraries. Note that 
this
+                       will overwrite library path detection, so use this 
parameter
+                       only if default library detection fails and you know 
exactly
+                        where your boost libraries are located.]),
+        [
+        if test -d $withval
+        then
+                ac_boost_lib_path="$withval"
+        else
+                AC_MSG_ERROR(--with-boost-libdir expected directory name)
+        fi
+        ],
+        [ac_boost_lib_path=""]
+)
+
+if test "x$want_boost" = "xyes"; then
+    boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
+    boost_lib_version_req_shorten=`expr $boost_lib_version_req : 
'\([[0-9]]*\.[[0-9]]*\)'`
+    boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
+    boost_lib_version_req_minor=`expr $boost_lib_version_req : 
'[[0-9]]*\.\([[0-9]]*\)'`
+    boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : 
'[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
+    if test "x$boost_lib_version_req_sub_minor" = "x" ; then
+        boost_lib_version_req_sub_minor="0"
+        fi
+    WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+  
$boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
+    AC_MSG_CHECKING(for boost >= $boost_lib_version_req)
+    succeeded=no
+
+    dnl first we check the system location for boost libraries
+    dnl this location ist chosen if boost libraries are installed with the 
--layout=system option
+    dnl or if you install boost with RPM
+    if test "$ac_boost_path" != ""; then
+       dnl Look first where we think they ought to be, accounting for a 
possible "64" suffix on lib.
+       dnl If that directory doesn't exist, fall back to the default behavior
+       if test -d "$ac_boost_path/lib${gr_libdir_suffix}"; then
+            BOOST_LDFLAGS="-L$ac_boost_path/lib${gr_libdir_suffix}"
+        else
+            BOOST_LDFLAGS="-L$ac_boost_path/lib"
+        fi
+        BOOST_CPPFLAGS="-I$ac_boost_path/include"
+    else
+        for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
+            if test -d "$ac_boost_path_tmp/include/boost" && test -r 
"$ac_boost_path_tmp/include/boost"; then
+               dnl Look first where we think they ought to be, accounting for 
a possible "64" suffix on lib.
+               dnl If that directory doesn't exist, fall back to the default 
behavior
+               if test -d "$ac_boost_path_tmp/lib${gr_libdir_suffix}"; then
+                    BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib${gr_libdir_suffix}"
+               else
+                   BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib"
+               fi
+                BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
+                break;
+            fi
+        done
+    fi
+
+    dnl overwrite ld flags if we have required special directory with
+    dnl --with-boost-libdir parameter
+    if test "$ac_boost_lib_path" != ""; then
+       BOOST_LDFLAGS="-L$ac_boost_lib_path"
+    fi
+
+    CPPFLAGS_SAVED="$CPPFLAGS"
+    CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+    export CPPFLAGS
+
+    LDFLAGS_SAVED="$LDFLAGS"
+    LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+    export LDFLAGS
+
+    AC_LANG_PUSH(C++)
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+    @%:@include <boost/version.hpp>
+    ]], [[
+    #if BOOST_VERSION >= $WANT_BOOST_VERSION
+    // Everything is okay
+    #else
+    #  error Boost version is too old
+    #endif
+    ]])],[AC_MSG_RESULT(yes)
+         succeeded=yes
+         found_system=yes
+          ],
+         [])
+    AC_LANG_POP([C++])
+    CPPFLAGS="$CPPFLAGS_SAVED"
+    LDFLAGS="$LDFLAGS_SAVED"
+
+
+    dnl if we found no boost with system layout we search for boost libraries
+    dnl built and installed without the --layout=system option
+    if test "$succeeded" != "yes"; then
+        _version=0
+
+        if test "$ac_boost_path" != ""; then
+           path_list="$ac_boost_path"
+       else
+           path_list="/usr /usr/local /opt /opt/local"
+       fi
+        for ac_boost_path in $path_list ; do
+           if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
+               for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
+                   _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 
's,/include/boost-,,; s,_,.,'`
+                    V_CHECK=`expr $_version_tmp \> $_version`
+                    if test "$V_CHECK" = "1" ; then
+                        _version=$_version_tmp
+                        best_path=$ac_boost_path
+                   fi
+                done
+            fi
+       done
+
+        VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
+        BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
+
+        if test "$ac_boost_lib_path" = "";  then
+           dnl Look first where we think they ought to be, accounting for a 
possible "64" suffix on lib.
+           dnl If that directory doesn't exist, fall back to the default 
behavior
+           if test -d "$best_path/lib${gr_libdir_suffix}"; then
+                BOOST_LDFLAGS="-L$best_path/lib${gr_libdir_suffix}"
+           else
+                BOOST_LDFLAGS="-L$best_path/lib"
+           fi
+        fi
+
+        CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+        export CPPFLAGS
+        LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+        export LDFLAGS
+
+        AC_LANG_PUSH(C++)
+            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+        @%:@include <boost/version.hpp>
+        ]], [[
+        #if BOOST_VERSION >= $WANT_BOOST_VERSION
+        // Everything is okay
+        #else
+        #  error Boost version is too old
+        #endif
+        ]])],[AC_MSG_RESULT(yes)
+             succeeded=yes
+              found_system=yes
+              ],
+            [])
+        AC_LANG_POP([C++])
+        CPPFLAGS="$CPPFLAGS_SAVED"
+        LDFLAGS="$LDFLAGS_SAVED"
+    fi
+
+    if test "$succeeded" != "yes" ; then
+       AC_MSG_RESULT([no])
+        if test "$_version" = "0" ; then
+            AC_MSG_ERROR([[we could not detect the boost libraries (version 
$boost_lib_version_req_shorten or higher).
+If you are sure you have boost installed, then check your version number 
looking in <boost/version.hpp>.]])
+        else
+            AC_MSG_ERROR([your boost libraries seem to old (version 
$_version).])
+        fi
+    else
+        AC_SUBST(BOOST_CPPFLAGS)
+        AC_SUBST(BOOST_LDFLAGS)
+        AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
+    fi
+fi
+])

Copied: gnuradio/branches/features/mp-sched/config/ax_boost_date_time.m4 (from 
rev 8915, 
gnuradio/branches/developers/eb/sched-wip/config/ax_boost_date_time.m4)
===================================================================
--- gnuradio/branches/features/mp-sched/config/ax_boost_date_time.m4            
                (rev 0)
+++ gnuradio/branches/features/mp-sched/config/ax_boost_date_time.m4    
2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,113 @@
+# ===========================================================================
+#           http://autoconf-archive.cryp.to/ax_boost_date_time.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_BOOST_DATE_TIME
+#
+# DESCRIPTION
+#
+#   Test for Date_Time library from the Boost C++ libraries. The macro
+#   requires a preceding call to AX_BOOST_BASE. Further documentation is
+#   available at <http://randspringer.de/boost/index.html>.
+#
+#   This macro calls:
+#
+#     AC_SUBST(BOOST_DATE_TIME_LIB)
+#
+#   And sets:
+#
+#     HAVE_BOOST_DATE_TIME
+#
+# LAST MODIFICATION
+#
+#   2008-04-12
+#
+# COPYLEFT
+#
+#   Copyright (c) 2008 Thomas Porschberg <address@hidden>
+#   Copyright (c) 2008 Michael Tindal
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_DATE_TIME],
+[
+    AC_ARG_WITH([boost-date-time],
+    AS_HELP_STRING([--with-boost-date-time@<:@=special-lib@:>@],
+                   [use the Date_Time library from boost - it is possible to 
specify a certain library for the linker
+                        e.g. 
--with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1 ]),
+        [
+        if test "$withval" = "no"; then
+            want_boost="no"
+        elif test "$withval" = "yes"; then
+            want_boost="yes"
+            ax_boost_user_date_time_lib=""
+        else
+            want_boost="yes"
+            ax_boost_user_date_time_lib="$withval"
+        fi
+        ],
+        [want_boost="yes"]
+    )
+
+    if test "x$want_boost" = "xyes"; then
+        AC_REQUIRE([AC_PROG_CC])
+        CPPFLAGS_SAVED="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+        export CPPFLAGS
+
+        LDFLAGS_SAVED="$LDFLAGS"
+        LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+        export LDFLAGS
+
+        AC_CACHE_CHECK(whether the Boost::Date_Time library is available,
+                       ax_cv_boost_date_time,
+        [AC_LANG_PUSH([C++])
+         AC_COMPILE_IFELSE(AC_LANG_PROGRAM(address@hidden:@include 
<boost/date_time/gregorian/gregorian_types.hpp>]],
+                                   [[using namespace boost::gregorian; date 
d(2002,Jan,10);
+                                     return 0;
+                                   ]]),
+         ax_cv_boost_date_time=yes, ax_cv_boost_date_time=no)
+         AC_LANG_POP([C++])
+        ])
+        if test "x$ax_cv_boost_date_time" = "xyes"; then
+           AC_LANG_PUSH([C++])
+            AC_DEFINE(HAVE_BOOST_DATE_TIME,,[define if the Boost::Date_Time 
library is available])
+            BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
+            if test "x$ax_boost_user_date_time_lib" = "x"; then
+                for libextension in `ls 
$BOOSTLIBDIR/libboost_date_time*.{so,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 
's;^lib\(boost_date_time.*\)\.so.*$;\1;' -e 
's;^lib\(boost_date_time.*\)\.a*$;\1;'` ; do
+                    ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_DATE_TIME_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes"; break],
+                                 [link_date_time="no"])
+                done
+                if test "x$link_date_time" != "xyes"; then
+                for libextension in `ls $BOOSTLIBDIR/boost_date_time*.{dll,a}* 
2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_date_time.*\)\.dll.*$;\1;' -e 
's;^\(boost_date_time.*\)\.a*$;\1;'` ; do
+                    ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_DATE_TIME_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes"; break],
+                                 [link_date_time="no"])
+                done
+                fi
+
+            else
+               for ax_lib in $ax_boost_user_date_time_lib 
boost_date_time-$ax_boost_user_date_time_lib; do
+                      AC_CHECK_LIB($ax_lib, main,
+                                   [BOOST_DATE_TIME_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes"; break],
+                                   [link_date_time="no"])
+               done
+
+            fi
+            if test "x$link_date_time" != "xyes"; then
+                AC_MSG_ERROR(Could not link against $ax_lib !)
+            fi
+           AC_LANG_POP([C++])
+        fi
+
+        CPPFLAGS="$CPPFLAGS_SAVED"
+        LDFLAGS="$LDFLAGS_SAVED"
+    fi
+])

Copied: gnuradio/branches/features/mp-sched/config/ax_boost_filesystem.m4 (from 
rev 8915, 
gnuradio/branches/developers/eb/sched-wip/config/ax_boost_filesystem.m4)
===================================================================
--- gnuradio/branches/features/mp-sched/config/ax_boost_filesystem.m4           
                (rev 0)
+++ gnuradio/branches/features/mp-sched/config/ax_boost_filesystem.m4   
2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,112 @@
+# ===========================================================================
+#          http://autoconf-archive.cryp.to/ax_boost_filesystem.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_BOOST_FILESYSTEM
+#
+# DESCRIPTION
+#
+#   Test for Filesystem library from the Boost C++ libraries. The macro
+#   requires a preceding call to AX_BOOST_BASE. Further documentation is
+#   available at <http://randspringer.de/boost/index.html>.
+#
+#   This macro calls:
+#
+#     AC_SUBST(BOOST_FILESYSTEM_LIB)
+#
+#   And sets:
+#
+#     HAVE_BOOST_FILESYSTEM
+#
+# LAST MODIFICATION
+#
+#   2008-04-12
+#
+# COPYLEFT
+#
+#   Copyright (c) 2008 Thomas Porschberg <address@hidden>
+#   Copyright (c) 2008 Michael Tindal
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_FILESYSTEM],
+[
+    AC_ARG_WITH([boost-filesystem],
+    AS_HELP_STRING([--with-boost-filesystem@<:@=special-lib@:>@],
+                   [use the Filesystem library from boost - it is possible to 
specify a certain library for the linker
+                        e.g. --with-boost-filesystem=boost_filesystem-gcc-mt 
]),
+        [
+        if test "$withval" = "no"; then
+            want_boost="no"
+        elif test "$withval" = "yes"; then
+            want_boost="yes"
+            ax_boost_user_filesystem_lib=""
+        else
+            want_boost="yes"
+            ax_boost_user_filesystem_lib="$withval"
+        fi
+        ],
+        [want_boost="yes"]
+    )
+
+    if test "x$want_boost" = "xyes"; then
+        AC_REQUIRE([AC_PROG_CC])
+        CPPFLAGS_SAVED="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+        export CPPFLAGS
+
+        LDFLAGS_SAVED="$LDFLAGS"
+        LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+        export LDFLAGS
+
+        AC_CACHE_CHECK(whether the Boost::Filesystem library is available,
+                       ax_cv_boost_filesystem,
+        [AC_LANG_PUSH([C++])
+         AC_COMPILE_IFELSE(AC_LANG_PROGRAM(address@hidden:@include 
<boost/filesystem/path.hpp>]],
+                                   [[using namespace boost::filesystem;
+                                   path my_path( "foo/bar/data.txt" );
+                                   return 0;]]),
+                                   ax_cv_boost_filesystem=yes, 
ax_cv_boost_filesystem=no)
+         AC_LANG_POP([C++])
+        ])
+        if test "x$ax_cv_boost_filesystem" = "xyes"; then
+           AC_LANG_PUSH([C++])
+            AC_DEFINE(HAVE_BOOST_FILESYSTEM,,[define if the Boost::Filesystem 
library is available])
+            BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
+            if test "x$ax_boost_user_filesystem_lib" = "x"; then
+                for libextension in `ls 
$BOOSTLIBDIR/libboost_filesystem*.{so,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 
's;^lib\(boost_filesystem.*\)\.so.*$;\1;' -e 
's;^lib\(boost_filesystem.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_FILESYSTEM_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
+                                 [link_filesystem="no"])
+                done
+                if test "x$link_program_options" != "xyes"; then
+                for libextension in `ls 
$BOOSTLIBDIR/boost_filesystem*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 
's;^\(boost_filesystem.*\)\.dll.*$;\1;' -e 
's;^\(boost_filesystem.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_FILESYSTEM_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
+                                 [link_filesystem="no"])
+                done
+                fi
+            else
+               for ax_lib in $ax_boost_user_filesystem_lib 
boost_filesystem-$ax_boost_user_filesystem_lib; do
+                      AC_CHECK_LIB($ax_lib, exit,
+                                   [BOOST_FILESYSTEM_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
+                                   [link_filesystem="no"])
+                  done
+
+            fi
+            if test "x$link_filesystem" != "xyes"; then
+                AC_MSG_ERROR(Could not link against $ax_lib !)
+            fi
+           AC_LANG_POP([C++])
+        fi
+
+        CPPFLAGS="$CPPFLAGS_SAVED"
+        LDFLAGS="$LDFLAGS_SAVED"
+    fi
+])

Copied: gnuradio/branches/features/mp-sched/config/ax_boost_iostreams.m4 (from 
rev 8915, 
gnuradio/branches/developers/eb/sched-wip/config/ax_boost_iostreams.m4)
===================================================================
--- gnuradio/branches/features/mp-sched/config/ax_boost_iostreams.m4            
                (rev 0)
+++ gnuradio/branches/features/mp-sched/config/ax_boost_iostreams.m4    
2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,116 @@
+# ===========================================================================
+#           http://autoconf-archive.cryp.to/ax_boost_iostreams.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_BOOST_IOSTREAMS
+#
+# DESCRIPTION
+#
+#   Test for IOStreams library from the Boost C++ libraries. The macro
+#   requires a preceding call to AX_BOOST_BASE. Further documentation is
+#   available at <http://randspringer.de/boost/index.html>.
+#
+#   This macro calls:
+#
+#     AC_SUBST(BOOST_IOSTREAMS_LIB)
+#
+#   And sets:
+#
+#     HAVE_BOOST_IOSTREAMS
+#
+# LAST MODIFICATION
+#
+#   2008-04-12
+#
+# COPYLEFT
+#
+#   Copyright (c) 2008 Thomas Porschberg <address@hidden>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_IOSTREAMS],
+[
+    AC_ARG_WITH([boost-iostreams],
+    AS_HELP_STRING([--with-boost-iostreams@<:@=special-lib@:>@],
+                   [use the IOStreams library from boost - it is possible to 
specify a certain library for the linker
+                        e.g. 
--with-boost-iostreams=boost_iostreams-gcc-mt-d-1_33_1 ]),
+        [
+        if test "$withval" = "no"; then
+            want_boost="no"
+        elif test "$withval" = "yes"; then
+            want_boost="yes"
+            ax_boost_user_iostreams_lib=""
+        else
+            want_boost="yes"
+            ax_boost_user_iostreams_lib="$withval"
+        fi
+        ],
+        [want_boost="yes"]
+    )
+
+    if test "x$want_boost" = "xyes"; then
+        AC_REQUIRE([AC_PROG_CC])
+        CPPFLAGS_SAVED="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+        export CPPFLAGS
+
+        LDFLAGS_SAVED="$LDFLAGS"
+        LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+        export LDFLAGS
+
+        AC_CACHE_CHECK(whether the Boost::IOStreams library is available,
+                       ax_cv_boost_iostreams,
+        [AC_LANG_PUSH([C++])
+         AC_COMPILE_IFELSE(AC_LANG_PROGRAM(address@hidden:@include 
<boost/iostreams/filtering_stream.hpp>
+                                             @%:@include 
<boost/range/iterator_range.hpp>
+                                            ]],
+                                  [[std::string  input = "Hello World!";
+                                     namespace io = boost::iostreams;
+                                     io::filtering_istream  
in(boost::make_iterator_range(input));
+                                     return 0;
+                                   ]]),
+                             ax_cv_boost_iostreams=yes, 
ax_cv_boost_iostreams=no)
+         AC_LANG_POP([C++])
+        ])
+        if test "x$ax_cv_boost_iostreams" = "xyes"; then
+           AC_LANG_PUSH([C++])
+            AC_DEFINE(HAVE_BOOST_IOSTREAMS,,[define if the Boost::IOStreams 
library is available])
+            BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
+            if test "x$ax_boost_user_iostreams_lib" = "x"; then
+                for libextension in `ls 
$BOOSTLIBDIR/libboost_iostreams*.{so,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 
's;^lib\(boost_iostreams.*\)\.so.*$;\1;' -e 
's;^lib\(boost_iostreams.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_IOSTREAMS_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_IOSTREAMS_LIB) link_iostreams="yes"; break],
+                                 [link_iostreams="no"])
+                done
+                if test "x$link_iostreams" != "xyes"; then
+                for libextension in `ls $BOOSTLIBDIR/boost_iostreams*.{dll,a}* 
2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_iostreams.*\)\.dll.*$;\1;' -e 
's;^\(boost_iostreams.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_IOSTREAMS_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_IOSTREAMS_LIB) link_iostreams="yes"; break],
+                                 [link_iostreams="no"])
+                done
+                fi
+
+            else
+               for ax_lib in $ax_boost_user_iostreams_lib 
boost_iostreams-$ax_boost_user_iostreams_lib; do
+                      AC_CHECK_LIB($ax_lib, main,
+                                   [BOOST_IOSTREAMS_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_IOSTREAMS_LIB) link_iostreams="yes"; break],
+                                   [link_iostreams="no"])
+                  done
+
+            fi
+            if test "x$link_iostreams" != "xyes"; then
+                AC_MSG_ERROR(Could not link against $ax_lib !)
+            fi
+           AC_LANG_POP([C++])
+        fi
+
+        CPPFLAGS="$CPPFLAGS_SAVED"
+        LDFLAGS="$LDFLAGS_SAVED"
+    fi
+])

Copied: gnuradio/branches/features/mp-sched/config/ax_boost_program_options.m4 
(from rev 8915, 
gnuradio/branches/developers/eb/sched-wip/config/ax_boost_program_options.m4)
===================================================================
--- gnuradio/branches/features/mp-sched/config/ax_boost_program_options.m4      
                        (rev 0)
+++ gnuradio/branches/features/mp-sched/config/ax_boost_program_options.m4      
2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,108 @@
+# ===========================================================================
+#        http://autoconf-archive.cryp.to/ax_boost_program_options.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_BOOST_PROGRAM_OPTIONS
+#
+# DESCRIPTION
+#
+#   Test for program options library from the Boost C++ libraries. The macro
+#   requires a preceding call to AX_BOOST_BASE. Further documentation is
+#   available at <http://randspringer.de/boost/index.html>.
+#
+#   This macro calls:
+#
+#     AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB)
+#
+#   And sets:
+#
+#     HAVE_BOOST_PROGRAM_OPTIONS
+#
+# LAST MODIFICATION
+#
+#   2008-04-12
+#
+# COPYLEFT
+#
+#   Copyright (c) 2008 Thomas Porschberg <address@hidden>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS],
+[
+    AC_ARG_WITH([boost-program-options],
+        AS_HELP_STRING([--with-boost-program-options@<:@=special-lib@:>@],
+                       [use the program options library from boost - it is 
possible to specify a certain library for the linker
+                        e.g. 
--with-boost-program-options=boost_program_options-gcc-mt-1_33_1 ]),
+        [
+        if test "$withval" = "no"; then
+            want_boost="no"
+        elif test "$withval" = "yes"; then
+            want_boost="yes"
+            ax_boost_user_program_options_lib=""
+        else
+            want_boost="yes"
+            ax_boost_user_program_options_lib="$withval"
+        fi
+        ],
+        [want_boost="yes"]
+    )
+
+    if test "x$want_boost" = "xyes"; then
+        AC_REQUIRE([AC_PROG_CC])
+        export want_boost
+        CPPFLAGS_SAVED="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+        export CPPFLAGS
+        LDFLAGS_SAVED="$LDFLAGS"
+        LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+        export LDFLAGS
+        AC_CACHE_CHECK([whether the Boost::Program_Options library is 
available],
+                       ax_cv_boost_program_options,
+                       [AC_LANG_PUSH(C++)
+                        
AC_COMPILE_IFELSE(AC_LANG_PROGRAM(address@hidden:@include 
<boost/program_options.hpp>
+                                                          ]],
+                                  
[[boost::program_options::options_description generic("Generic options");
+                                   return 0;]]),
+                           ax_cv_boost_program_options=yes, 
ax_cv_boost_program_options=no)
+                            AC_LANG_POP([C++])
+        ])
+        if test "$ax_cv_boost_program_options" = yes; then
+               AC_LANG_PUSH([C++])
+                AC_DEFINE(HAVE_BOOST_PROGRAM_OPTIONS,,[define if the 
Boost::PROGRAM_OPTIONS library is available])
+                  BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
+                if test "x$ax_boost_user_program_options_lib" = "x"; then
+                for libextension in `ls 
$BOOSTLIBDIR/libboost_program_options*.{so,a}* 2>/dev/null | sed 's,.*/,,' | 
sed -e 's;^lib\(boost_program_options.*\)\.so.*$;\1;' -e 
's;^lib\(boost_program_options.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
+                                 [link_program_options="no"])
+                done
+                if test "x$link_program_options" != "xyes"; then
+                for libextension in `ls 
$BOOSTLIBDIR/boost_program_options*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed 
-e 's;^\(boost_program_options.*\)\.dll.*$;\1;' -e 
's;^\(boost_program_options.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
+                                 [link_program_options="no"])
+                done
+                fi
+                else
+                  for ax_lib in $ax_boost_user_program_options_lib 
boost_program_options-$ax_boost_user_program_options_lib; do
+                      AC_CHECK_LIB($ax_lib, main,
+                                   [BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
+                                   [link_program_options="no"])
+                  done
+                fi
+                if test "x$link_program_options" != "xyes"; then
+                    AC_MSG_ERROR([Could not link against [$ax_lib] !])
+                fi
+               AC_LANG_POP([C++])
+        fi
+        CPPFLAGS="$CPPFLAGS_SAVED"
+        LDFLAGS="$LDFLAGS_SAVED"
+    fi
+])

Copied: gnuradio/branches/features/mp-sched/config/ax_boost_python.m4 (from rev 
8915, gnuradio/branches/developers/eb/sched-wip/config/ax_boost_python.m4)
===================================================================
--- gnuradio/branches/features/mp-sched/config/ax_boost_python.m4               
                (rev 0)
+++ gnuradio/branches/features/mp-sched/config/ax_boost_python.m4       
2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,92 @@
+# ===========================================================================
+#            http://autoconf-archive.cryp.to/ax_boost_python.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_BOOST_PYTHON
+#
+# DESCRIPTION
+#
+#   This macro checks to see if the Boost.Python library is installed. It
+#   also attempts to guess the currect library name using several attempts.
+#   It tries to build the library name using a user supplied name or suffix
+#   and then just the raw library.
+#
+#   If the library is found, HAVE_BOOST_PYTHON is defined and
+#   BOOST_PYTHON_LIB is set to the name of the library.
+#
+#   This macro calls AC_SUBST(BOOST_PYTHON_LIB).
+#
+#   In order to ensure that the Python headers are specified on the include
+#   path, this macro requires AX_PYTHON to be called.
+#
+# LAST MODIFICATION
+#
+#   2008-04-12
+#
+# COPYLEFT
+#
+#   Copyright (c) 2008 Michael Tindal
+#
+#   This program is free software; you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation; either version 2 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Macro Archive. When you make and
+#   distribute a modified version of the Autoconf Macro, you may extend this
+#   special exception to the GPL to apply to your modified version as well.
+
+AC_DEFUN([AX_BOOST_PYTHON],
+[AC_REQUIRE([AX_PYTHON])dnl
+AC_CACHE_CHECK(whether the Boost::Python library is available,
+ac_cv_boost_python,
+[AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ CPPFLAGS_SAVE=$CPPFLAGS
+ if test x$PYTHON_INCLUDE_DIR != x; then
+   CPPFLAGS=-I$PYTHON_INCLUDE_DIR $CPPFLAGS
+ fi
+ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[
+ #include <boost/python/module.hpp>
+ using namespace boost::python;
+ BOOST_PYTHON_MODULE(test) { throw "Boost::Python test."; }]],
+               [[return 0;]]),
+               ac_cv_boost_python=yes, ac_cv_boost_python=no)
+ AC_LANG_RESTORE
+ CPPFLAGS=$CPPFLAGS_SAVE
+])
+if test "$ac_cv_boost_python" = "yes"; then
+  AC_LANG_PUSH([C++])
+  AC_DEFINE(HAVE_BOOST_PYTHON,,[define if the Boost::Python library is 
available])
+  ax_python_lib=boost_python
+  AC_ARG_WITH([boost-python],AS_HELP_STRING([--with-boost-python],[specify the 
boost python library or suffix to use]),
+  [if test "x$with_boost_python" != "xno"; then
+     ax_python_lib=$with_boost_python
+     ax_boost_python_lib=boost_python-$with_boost_python
+   fi])
+  for ax_lib in $ax_python_lib $ax_boost_python_lib boost_python; do
+    AC_CHECK_LIB($ax_lib, exit, [BOOST_PYTHON_LIB=$ax_lib break])
+  done
+  AC_SUBST(BOOST_PYTHON_LIB)
+  AC_LANG_POP([C++])
+fi
+])dnl

Copied: gnuradio/branches/features/mp-sched/config/ax_boost_regex.m4 (from rev 
8915, gnuradio/branches/developers/eb/sched-wip/config/ax_boost_regex.m4)
===================================================================
--- gnuradio/branches/features/mp-sched/config/ax_boost_regex.m4                
                (rev 0)
+++ gnuradio/branches/features/mp-sched/config/ax_boost_regex.m4        
2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,111 @@
+# ===========================================================================
+#             http://autoconf-archive.cryp.to/ax_boost_regex.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_BOOST_REGEX
+#
+# DESCRIPTION
+#
+#   Test for Regex library from the Boost C++ libraries. The macro requires
+#   a preceding call to AX_BOOST_BASE. Further documentation is available at
+#   <http://randspringer.de/boost/index.html>.
+#
+#   This macro calls:
+#
+#     AC_SUBST(BOOST_REGEX_LIB)
+#
+#   And sets:
+#
+#     HAVE_BOOST_REGEX
+#
+# LAST MODIFICATION
+#
+#   2008-04-12
+#
+# COPYLEFT
+#
+#   Copyright (c) 2008 Thomas Porschberg <address@hidden>
+#   Copyright (c) 2008 Michael Tindal
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_REGEX],
+[
+    AC_ARG_WITH([boost-regex],
+    AS_HELP_STRING([--with-boost-regex@<:@=special-lib@:>@],
+                   [use the Regex library from boost - it is possible to 
specify a certain library for the linker
+                        e.g. --with-boost-regex=boost_regex-gcc-mt-d-1_33_1 ]),
+        [
+        if test "$withval" = "no"; then
+            want_boost="no"
+        elif test "$withval" = "yes"; then
+            want_boost="yes"
+            ax_boost_user_regex_lib=""
+        else
+            want_boost="yes"
+            ax_boost_user_regex_lib="$withval"
+        fi
+        ],
+        [want_boost="yes"]
+    )
+
+    if test "x$want_boost" = "xyes"; then
+        AC_REQUIRE([AC_PROG_CC])
+        CPPFLAGS_SAVED="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+        export CPPFLAGS
+
+        LDFLAGS_SAVED="$LDFLAGS"
+        LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+        export LDFLAGS
+
+        AC_CACHE_CHECK(whether the Boost::Regex library is available,
+                       ax_cv_boost_regex,
+        [AC_LANG_PUSH([C++])
+             AC_COMPILE_IFELSE(AC_LANG_PROGRAM(address@hidden:@include 
<boost/regex.hpp>
+                                                ]],
+                                   [[boost::regex r(); return 0;]]),
+                   ax_cv_boost_regex=yes, ax_cv_boost_regex=no)
+         AC_LANG_POP([C++])
+        ])
+        if test "x$ax_cv_boost_regex" = "xyes"; then
+           AC_LANG_PUSH([C++])
+            AC_DEFINE(HAVE_BOOST_REGEX,,[define if the Boost::Regex library is 
available])
+            BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
+            if test "x$ax_boost_user_regex_lib" = "x"; then
+                for libextension in `ls $BOOSTLIBDIR/libboost_regex*.{so,a}* 
2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_regex.*\)\.so.*$;\1;' -e 
's;^lib\(boost_regex.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_REGEX_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break],
+                                 [link_regex="no"])
+                done
+                if test "x$link_regex" != "xyes"; then
+                for libextension in `ls $BOOSTLIBDIR/boost_regex*.{dll,a}* 
2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_regex.*\)\.dll.*$;\1;' -e 
's;^\(boost_regex.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_REGEX_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break],
+                                 [link_regex="no"])
+                done
+                fi
+
+            else
+               for ax_lib in $ax_boost_user_regex_lib 
boost_regex-$ax_boost_user_regex_lib; do
+                      AC_CHECK_LIB($ax_lib, main,
+                                   [BOOST_REGEX_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break],
+                                   [link_regex="no"])
+               done
+            fi
+            if test "x$link_regex" != "xyes"; then
+                AC_MSG_ERROR(Could not link against $ax_lib !)
+            fi
+           AC_LANG_POP([C++])
+        fi
+
+        CPPFLAGS="$CPPFLAGS_SAVED"
+        LDFLAGS="$LDFLAGS_SAVED"
+    fi
+])

Copied: gnuradio/branches/features/mp-sched/config/ax_boost_serialization.m4 
(from rev 8915, 
gnuradio/branches/developers/eb/sched-wip/config/ax_boost_serialization.m4)
===================================================================
--- gnuradio/branches/features/mp-sched/config/ax_boost_serialization.m4        
                        (rev 0)
+++ gnuradio/branches/features/mp-sched/config/ax_boost_serialization.m4        
2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,117 @@
+# ===========================================================================
+#         http://autoconf-archive.cryp.to/ax_boost_serialization.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_BOOST_SERIALIZATION
+#
+# DESCRIPTION
+#
+#   Test for Serialization library from the Boost C++ libraries. The macro
+#   requires a preceding call to AX_BOOST_BASE. Further documentation is
+#   available at <http://randspringer.de/boost/index.html>.
+#
+#   This macro calls:
+#
+#     AC_SUBST(BOOST_SERIALIZATION_LIB)
+#
+#   And sets:
+#
+#     HAVE_BOOST_SERIALIZATION
+#
+# LAST MODIFICATION
+#
+#   2008-04-12
+#
+# COPYLEFT
+#
+#   Copyright (c) 2008 Thomas Porschberg <address@hidden>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_SERIALIZATION],
+[
+    AC_ARG_WITH([boost-serialization],
+    AS_HELP_STRING([--with-boost-serialization@<:@=special-lib@:>@],
+                   [use the Serialization library from boost - it is possible 
to specify a certain library for the linker
+                        e.g. 
--with-boost-serialization=boost_serialization-gcc-mt-d-1_33_1 ]),
+        [
+        if test "$withval" = "no"; then
+            want_boost="no"
+        elif test "$withval" = "yes"; then
+            want_boost="yes"
+            ax_boost_user_serialization_lib=""
+        else
+            want_boost="yes"
+            ax_boost_user_serialization_lib="$withval"
+        fi
+        ],
+        [want_boost="yes"]
+    )
+
+    if test "x$want_boost" = "xyes"; then
+        AC_REQUIRE([AC_PROG_CC])
+        CPPFLAGS_SAVED="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+        AC_MSG_WARN(BOOST_CPPFLAGS $BOOST_CPPFLAGS)
+        export CPPFLAGS
+
+        LDFLAGS_SAVED="$LDFLAGS"
+        LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+        export LDFLAGS
+
+        AC_CACHE_CHECK(whether the Boost::Serialization library is available,
+                       ax_cv_boost_serialization,
+        [AC_LANG_PUSH([C++])
+             AC_COMPILE_IFELSE(AC_LANG_PROGRAM(address@hidden:@include 
<fstream>
+                                                 @%:@include 
<boost/archive/text_oarchive.hpp>
+                                                 @%:@include 
<boost/archive/text_iarchive.hpp>
+                                                ]],
+                                   [[std::ofstream ofs("filename");
+                                    boost::archive::text_oarchive oa(ofs);
+                                     return 0;
+                                   ]]),
+                   ax_cv_boost_serialization=yes, ax_cv_boost_serialization=no)
+         AC_LANG_POP([C++])
+        ])
+        if test "x$ax_cv_boost_serialization" = "xyes"; then
+           AC_LANG_PUSH([C++])
+            AC_DEFINE(HAVE_BOOST_SERIALIZATION,,[define if the 
Boost::Serialization library is available])
+            BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
+            if test "x$ax_boost_user_serialization_lib" = "x"; then
+                for libextension in `ls 
$BOOSTLIBDIR/libboost_serialization*.{so,a}* 2>/dev/null | sed 's,.*/,,' | sed 
-e 's;^lib\(boost_serialization.*\)\.so.*$;\1;' -e 
's;^lib\(boost_serialization.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_SERIALIZATION_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_SERIALIZATION_LIB) link_serialization="yes"; break],
+                                 [link_serialization="no"])
+                done
+                if test "x$link_serialization" != "xyes"; then
+                for libextension in `ls 
$BOOSTLIBDIR/boost_serialization*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 
's;^\(boost_serialization.*\)\.dll.*$;\1;' -e 
's;^\(boost_serialization.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_SERIALIZATION_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_SERIALIZATION_LIB) link_serialization="yes"; break],
+                                 [link_serialization="no"])
+                done
+                fi
+
+            else
+               for ax_lib in $ax_boost_user_serialization_lib 
boost_serialization-$ax_boost_user_serialization_lib; do
+                      AC_CHECK_LIB($ax_lib, main,
+                                   [BOOST_SERIALIZATION_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_SERIALIZATION_LIB) link_serialization="yes"; break],
+                                   [link_serialization="no"])
+                  done
+
+            fi
+            if test "x$link_serialization" != "xyes"; then
+                AC_MSG_ERROR(Could not link against $ax_lib !)
+            fi
+           AC_LANG_POP([C++])
+        fi
+
+        CPPFLAGS="$CPPFLAGS_SAVED"
+        LDFLAGS="$LDFLAGS_SAVED"
+    fi
+])

Copied: gnuradio/branches/features/mp-sched/config/ax_boost_signals.m4 (from 
rev 8915, gnuradio/branches/developers/eb/sched-wip/config/ax_boost_signals.m4)
===================================================================
--- gnuradio/branches/features/mp-sched/config/ax_boost_signals.m4              
                (rev 0)
+++ gnuradio/branches/features/mp-sched/config/ax_boost_signals.m4      
2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,114 @@
+# ===========================================================================
+#            http://autoconf-archive.cryp.to/ax_boost_signals.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_BOOST_SIGNALS
+#
+# DESCRIPTION
+#
+#   Test for Signals library from the Boost C++ libraries. The macro
+#   requires a preceding call to AX_BOOST_BASE. Further documentation is
+#   available at <http://randspringer.de/boost/index.html>.
+#
+#   This macro calls:
+#
+#     AC_SUBST(BOOST_SIGNALS_LIB)
+#
+#   And sets:
+#
+#     HAVE_BOOST_SIGNALS
+#
+# LAST MODIFICATION
+#
+#   2008-04-12
+#
+# COPYLEFT
+#
+#   Copyright (c) 2008 Thomas Porschberg <address@hidden>
+#   Copyright (c) 2008 Michael Tindal
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_SIGNALS],
+[
+    AC_ARG_WITH([boost-signals],
+    AS_HELP_STRING([--with-boost-signals@<:@=special-lib@:>@],
+                   [use the Signals library from boost - it is possible to 
specify a certain library for the linker
+                        e.g. --with-boost-signals=boost_signals-gcc-mt-d ]),
+        [
+        if test "$withval" = "no"; then
+            want_boost="no"
+        elif test "$withval" = "yes"; then
+            want_boost="yes"
+            ax_boost_user_signals_lib=""
+        else
+            want_boost="yes"
+            ax_boost_user_signals_lib="$withval"
+        fi
+        ],
+        [want_boost="yes"]
+    )
+
+    if test "x$want_boost" = "xyes"; then
+        AC_REQUIRE([AC_PROG_CC])
+        CPPFLAGS_SAVED="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+        export CPPFLAGS
+
+        LDFLAGS_SAVED="$LDFLAGS"
+        LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+        export LDFLAGS
+
+        AC_CACHE_CHECK(whether the Boost::Signals library is available,
+                       ax_cv_boost_signals,
+        [AC_LANG_PUSH([C++])
+         AC_COMPILE_IFELSE(AC_LANG_PROGRAM(address@hidden:@include 
<boost/signal.hpp>
+                                            ]],
+                                  [[boost::signal<void ()> sig;
+                                    return 0;
+                                  ]]),
+                           ax_cv_boost_signals=yes, ax_cv_boost_signals=no)
+         AC_LANG_POP([C++])
+        ])
+        if test "x$ax_cv_boost_signals" = "xyes"; then
+           AC_LANG_PUSH([C++])
+            AC_DEFINE(HAVE_BOOST_SIGNALS,,[define if the Boost::Signals 
library is available])
+            BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
+            if test "x$ax_boost_user_signals_lib" = "x"; then
+                for libextension in `ls $BOOSTLIBDIR/libboost_signals*.{so,a}* 
2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_signals.*\)\.so.*$;\1;' -e 
's;^lib\(boost_signals.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_SIGNALS_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_SIGNALS_LIB) link_signals="yes"; break],
+                                 [link_signals="no"])
+                done
+                if test "x$link_signals" != "xyes"; then
+                for libextension in `ls $BOOSTLIBDIR/boost_signals*.{dll,a}* 
2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_signals.*\)\.dll.*$;\1;' -e 
's;^\(boost_signals.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_SIGNALS_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_SIGNALS_LIB) link_signals="yes"; break],
+                                 [link_signals="no"])
+                done
+                fi
+
+            else
+               for ax_lib in $ax_boost_user_signals_lib 
boost_signals-$ax_boost_user_signals_lib; do
+                      AC_CHECK_LIB($ax_lib, main,
+                                   [BOOST_SIGNALS_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_SIGNALS_LIB) link_signals="yes"; break],
+                                   [link_signals="no"])
+                  done
+
+            fi
+            if test "x$link_signals" != "xyes"; then
+                AC_MSG_ERROR(Could not link against $ax_lib !)
+            fi
+           AC_LANG_POP([C++])
+        fi
+
+        CPPFLAGS="$CPPFLAGS_SAVED"
+        LDFLAGS="$LDFLAGS_SAVED"
+    fi
+])

Copied: gnuradio/branches/features/mp-sched/config/ax_boost_system.m4 (from rev 
8915, gnuradio/branches/developers/eb/sched-wip/config/ax_boost_system.m4)
===================================================================
--- gnuradio/branches/features/mp-sched/config/ax_boost_system.m4               
                (rev 0)
+++ gnuradio/branches/features/mp-sched/config/ax_boost_system.m4       
2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,120 @@
+# ===========================================================================
+#            http://autoconf-archive.cryp.to/ax_boost_system.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_BOOST_SYSTEM
+#
+# DESCRIPTION
+#
+#   Test for System library from the Boost C++ libraries. The macro requires
+#   a preceding call to AX_BOOST_BASE. Further documentation is available at
+#   <http://randspringer.de/boost/index.html>.
+#
+#   This macro calls:
+#
+#     AC_SUBST(BOOST_SYSTEM_LIB)
+#
+#   And sets:
+#
+#     HAVE_BOOST_SYSTEM
+#
+# LAST MODIFICATION
+#
+#   2008-04-12
+#
+# COPYLEFT
+#
+#   Copyright (c) 2008 Thomas Porschberg <address@hidden>
+#   Copyright (c) 2008 Michael Tindal
+#   Copyright (c) 2008 Daniel Casimiro <address@hidden>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_SYSTEM],
+[
+    AC_ARG_WITH([boost-system],
+    AS_HELP_STRING([--with-boost-system@<:@=special-lib@:>@],
+                   [use the System library from boost - it is possible to 
specify a certain library for the linker
+                        e.g. --with-boost-system=boost_system-gcc-mt ]),
+        [
+        if test "$withval" = "no"; then
+            want_boost="no"
+        elif test "$withval" = "yes"; then
+            want_boost="yes"
+            ax_boost_user_system_lib=""
+        else
+            want_boost="yes"
+            ax_boost_user_system_lib="$withval"
+        fi
+        ],
+        [want_boost="yes"]
+    )
+
+    if test "x$want_boost" = "xyes"; then
+        AC_REQUIRE([AC_PROG_CC])
+        AC_REQUIRE([AC_CANONICAL_BUILD])
+        CPPFLAGS_SAVED="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+        export CPPFLAGS
+
+        LDFLAGS_SAVED="$LDFLAGS"
+        LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+        export LDFLAGS
+
+        AC_CACHE_CHECK(whether the Boost::System library is available,
+                       ax_cv_boost_system,
+        [AC_LANG_PUSH([C++])
+             CXXFLAGS_SAVE=$CXXFLAGS
+
+             AC_COMPILE_IFELSE(AC_LANG_PROGRAM(address@hidden:@include 
<boost/system/error_code.hpp>]],
+                                   [[boost::system::system_category]]),
+                   ax_cv_boost_system=yes, ax_cv_boost_system=no)
+             CXXFLAGS=$CXXFLAGS_SAVE
+             AC_LANG_POP([C++])
+        ])
+        if test "x$ax_cv_boost_system" = "xyes"; then
+           AC_LANG_PUSH([C++])
+            AC_SUBST(BOOST_CPPFLAGS)
+
+            AC_DEFINE(HAVE_BOOST_SYSTEM,,[define if the Boost::System library 
is available])
+            BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
+
+            LDFLAGS_SAVE=$LDFLAGS
+            if test "x$ax_boost_user_system_lib" = "x"; then
+                for libextension in `ls $BOOSTLIBDIR/libboost_system*.{so,a}* 
2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_system.*\)\.so.*$;\1;' -e 
's;^lib\(boost_system.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_SYSTEM_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
+                                 [link_system="no"])
+                done
+                if test "x$link_system" != "xyes"; then
+                for libextension in `ls $BOOSTLIBDIR/boost_system*.{dll,a}* 
2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_system.*\)\.dll.*$;\1;' -e 
's;^\(boost_system.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_SYSTEM_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
+                                 [link_system="no"])
+                done
+                fi
+
+            else
+               for ax_lib in $ax_boost_user_system_lib 
boost_system-$ax_boost_user_system_lib; do
+                      AC_CHECK_LIB($ax_lib, exit,
+                                   [BOOST_SYSTEM_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
+                                   [link_system="no"])
+                  done
+
+            fi
+            if test "x$link_system" = "xno"; then
+                AC_MSG_ERROR(Could not link against $ax_lib !)
+            fi
+           AC_LANG_POP([C++])
+        fi
+
+        CPPFLAGS="$CPPFLAGS_SAVED"
+        LDFLAGS="$LDFLAGS_SAVED"
+    fi
+])

Copied: 
gnuradio/branches/features/mp-sched/config/ax_boost_test_exec_monitor.m4 (from 
rev 8915, 
gnuradio/branches/developers/eb/sched-wip/config/ax_boost_test_exec_monitor.m4)
===================================================================
--- gnuradio/branches/features/mp-sched/config/ax_boost_test_exec_monitor.m4    
                        (rev 0)
+++ gnuradio/branches/features/mp-sched/config/ax_boost_test_exec_monitor.m4    
2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,139 @@
+# ===========================================================================
+#       http://autoconf-archive.cryp.to/ax_boost_test_exec_monitor.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_BOOST_TEST_EXEC_MONITOR
+#
+# DESCRIPTION
+#
+#   Test for Test_Exec_Monitor library from the Boost C++ libraries. The
+#   macro requires a preceding call to AX_BOOST_BASE. Further documentation
+#   is available at <http://randspringer.de/boost/index.html>.
+#
+#   This macro calls:
+#
+#     AC_SUBST(BOOST_TEST_EXEC_MONITOR_LIB)
+#
+#   And sets:
+#
+#     HAVE_BOOST_TEST_EXEC_MONITOR
+#
+# LAST MODIFICATION
+#
+#   2008-04-12
+#
+# COPYLEFT
+#
+#   Copyright (c) 2008 Dodji Seketeli <address@hidden>
+#   Copyright (c) 2008 Thomas Porschberg <address@hidden>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_TEST_EXEC_MONITOR],
+[
+    AC_ARG_WITH([boost-test-exec-monitor],
+    AS_HELP_STRING([--with-boost-test-exec-monitor@<:@=special-lib@:>@],
+                   [use the Test_Exec_Monitor library from boost - it is 
possible to specify a certain library for the linker
+                        e.g. 
--with-boost-test-exec-monitor=boost_test_exec_monitor-gcc ]),
+        [
+        if test "$withval" = "no"; then
+            want_boost="no"
+        elif test "$withval" = "yes"; then
+            want_boost="yes"
+            ax_boost_user_test_exec_monitor_lib=""
+        else
+            want_boost="yes"
+            ax_boost_user_test_exec_monitor_lib="$withval"
+        fi
+        ],
+        [want_boost="yes"]
+    )
+
+    if test "x$want_boost" = "xyes"; then
+        AC_REQUIRE([AC_PROG_CC])
+        CPPFLAGS_SAVED="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+        export CPPFLAGS
+
+        LDFLAGS_SAVED="$LDFLAGS"
+        LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+        export LDFLAGS
+
+        AC_CACHE_CHECK(whether the Boost::Test_Exec_Monitor library is 
available,
+                       ax_cv_boost_test_exec_monitor,
+        [AC_LANG_PUSH([C++])
+             AC_COMPILE_IFELSE(AC_LANG_PROGRAM(address@hidden:@include 
<boost/test/test_tools.hpp>]],
+                                    [[int i=1 ; BOOST_REQUIRE(i==1); ; return 
0;]]),
+                   ax_cv_boost_test_exec_monitor=yes, 
ax_cv_boost_test_exec_monitor=no)
+         AC_LANG_POP([C++])
+        ])
+        if test "x$ax_cv_boost_test_exec_monitor" = "xyes"; then
+           AC_LANG_PUSH([C++])
+            AC_DEFINE(HAVE_BOOST_TEST_EXEC_MONITOR,,[define if the 
Boost::Test_Exec_Monitor library is available])
+            BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
+
+            if test "x$ax_boost_user_test_exec_monitor_lib" = "x"; then
+                saved_ldflags="${LDFLAGS}"
+
+                for monitor_library in `ls 
$BOOSTLIBDIR/libboost_test_exec_monitor*.{so,a}* 2>/dev/null` ; do
+                    if test -r $monitor_library ; then
+                       libextension=`echo $monitor_library | sed 's,.*/,,' | 
sed -e 's;^lib\(boost_test_exec_monitor.*\)\.so.*$;\1;' -e 
's;^lib\(boost_test_exec_monitor.*\)\.a*$;\1;'`
+                       ax_lib=${libextension}
+                       link_test_exec_monitor="yes"
+                    else
+                       link_test_exec_monitor="no"
+                    fi
+
+                  if test "x$link_test_exec_monitor" = "xyes"; then
+                      BOOST_TEST_EXEC_MONITOR_LIB="-l$ax_lib"
+                      AC_SUBST(BOOST_TEST_EXEC_MONITOR_LIB)
+                      break
+                  fi
+                done
+                if test "x$link_test_exec_monitor" != "xyes"; then
+                for libextension in `ls 
$BOOSTLIBDIR/boost_test_exec_monitor*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | 
sed -e 's;^\(boost_test_exec_monitor.*\)\.dll.*$;\1;' -e 
's;^\(boost_test_exec_monitor.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_TEST_EXEC_MONITOR_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_TEST_EXEC_MONITOR_LIB) link_test_exec_monitor="yes"; break],
+                                 [link_test_exec_monitor="no"])
+                done
+                fi
+
+            else
+                link_test_exec_monitor="no"
+                saved_ldflags="${LDFLAGS}"
+                for ax_lib in 
boost_test_exec_monitor-$ax_boost_user_test_exec_monitor_lib 
$ax_boost_user_test_exec_monitor_lib ; do
+                   if test "x$link_test_exec_monitor" = "xyes"; then
+                      break;
+                   fi
+                   for monitor_library in `ls 
$BOOSTLIBDIR/lib${ax_lib}.{so,a}* 2>/dev/null` ; do
+                   if test -r $monitor_library ; then
+                       libextension=`echo $monitor_library | sed 's,.*/,,' | 
sed -e 's;^lib\(boost_test_exec_monitor.*\)\.so.*$;\1;' -e 
's;^lib\(boost_test_exec_monitor.*\)\.a*$;\1;'`
+                       ax_lib=${libextension}
+                       link_test_exec_monitor="yes"
+                    else
+                       link_test_exec_monitor="no"
+                    fi
+
+                    if test "x$link_test_exec_monitor" = "xyes"; then
+                        BOOST_TEST_EXEC_MONITOR_LIB="-l$ax_lib"
+                        AC_SUBST(BOOST_TEST_EXEC_MONITOR_LIB)
+                        break
+                    fi
+                  done
+               done
+            fi
+            if test "x$link_test_exec_monitor" != "xyes"; then
+                AC_MSG_ERROR(Could not link against $ax_lib !)
+            fi
+           AC_LANG_POP([C++])
+        fi
+
+        CPPFLAGS="$CPPFLAGS_SAVED"
+        LDFLAGS="$LDFLAGS_SAVED"
+    fi
+])

Copied: gnuradio/branches/features/mp-sched/config/ax_boost_thread.m4 (from rev 
8915, gnuradio/branches/developers/eb/sched-wip/config/ax_boost_thread.m4)
===================================================================
--- gnuradio/branches/features/mp-sched/config/ax_boost_thread.m4               
                (rev 0)
+++ gnuradio/branches/features/mp-sched/config/ax_boost_thread.m4       
2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,125 @@
+# ===========================================================================
+#            http://autoconf-archive.cryp.to/ax_boost_thread.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_BOOST_THREAD
+#
+# DESCRIPTION
+#
+#   Test for Thread library from the Boost C++ libraries. The macro requires
+#   a preceding call to AX_BOOST_BASE. Further documentation is available at
+#   <http://randspringer.de/boost/index.html>.
+#
+#   This macro calls:
+#
+#     AC_SUBST(BOOST_THREAD_LIB)
+#     AC_SUBST(BOOST_CXXFLAGS)
+#
+#   And sets:
+#
+#     HAVE_BOOST_THREAD
+#
+# LAST MODIFICATION
+#
+#   2008-04-12
+#
+# COPYLEFT
+#
+#   Copyright (c) 2008 Thomas Porschberg <address@hidden>
+#   Copyright (c) 2008 Michael Tindal
+#   Copyright (c) 2008 Free Software Foundation, Inc.
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_THREAD],
+[
+    AC_REQUIRE([ACX_PTHREAD])
+    AC_ARG_WITH([boost-thread],
+    AS_HELP_STRING([--with-boost-thread@<:@=special-lib@:>@],
+                   [use the Thread library from boost - it is possible to 
specify a certain library for the linker
+                        e.g. --with-boost-thread=boost_thread-gcc-mt ]),
+        [
+        if test "$withval" = "no"; then
+            want_boost="no"
+        elif test "$withval" = "yes"; then
+            want_boost="yes"
+            ax_boost_user_thread_lib=""
+        else
+            want_boost="yes"
+            ax_boost_user_thread_lib="$withval"
+        fi
+        ],
+        [want_boost="yes"]
+    )
+
+    if test "x$want_boost" = "xyes"; then
+        AC_REQUIRE([AC_PROG_CC])
+        AC_REQUIRE([AC_CANONICAL_HOST])
+
+        CPPFLAGS_SAVED="$CPPFLAGS"
+        LDFLAGS_SAVED="$LDFLAGS"
+       CXXFLAGS_SAVED="$CXXFLAGS"
+
+        CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+        LDFLAGS="$LDFLAGS $BOOST_LDFLAGS $PTHREAD_LIBS"
+       CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
+
+        AC_CACHE_CHECK(whether the Boost::Thread library is available,
+                       ax_cv_boost_thread,
+        [AC_LANG_PUSH([C++])
+             AC_COMPILE_IFELSE(AC_LANG_PROGRAM(address@hidden:@include 
<boost/thread/thread.hpp>]],
+                                   [[boost::thread_group thrds;
+                                   return 0;]]),
+                   ax_cv_boost_thread=yes, ax_cv_boost_thread=no)
+             AC_LANG_POP([C++])
+        ])
+        if test "x$ax_cv_boost_thread" = "xyes"; then
+           AC_LANG_PUSH([C++])
+           BOOST_CXXFLAGS="$PTHREAD_CFLAGS"
+            AC_SUBST(BOOST_CXXFLAGS)
+
+            AC_DEFINE(HAVE_BOOST_THREAD,,[define if the Boost::Thread library 
is available])
+            BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
+
+            if test "x$ax_boost_user_thread_lib" = "x"; then
+                for libextension in `ls $BOOSTLIBDIR/libboost_thread*.{so,a}* 
2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_thread.*\)\.so.*$;\1;' -e 
's;^lib\(boost_thread.*\)\.a*$;\1;'` ; do
+                    ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_THREAD_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
+                                 [link_thread="no"])
+                done
+                if test "x$link_thread" != "xyes"; then
+                for libextension in `ls $BOOSTLIBDIR/boost_thread*.{dll,a}* 
2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_thread.*\)\.dll.*$;\1;' -e 
's;^\(boost_thread.*\)\.a*$;\1;'` ; do
+                    ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_THREAD_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
+                                 [link_thread="no"])
+                done
+                fi
+
+            else
+               for ax_lib in $ax_boost_user_thread_lib 
boost_thread-$ax_boost_user_thread_lib; do
+                      AC_CHECK_LIB($ax_lib, exit,
+                                   [BOOST_THREAD_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
+                                   [link_thread="no"])
+                  done
+
+            fi
+            if test "x$link_thread" = "xno"; then
+                AC_MSG_ERROR(Could not link against $ax_lib !)
+            else
+               BOOST_THREAD_LIB="$BOOST_THREAD_LIB $PTHREAD_LIBS"
+               dnl BOOST_LDFLAGS="$BOOST_LDFLAGS $PTHREAD_LIBS"
+            fi
+           AC_LANG_POP([C++])
+        fi
+
+        CPPFLAGS="$CPPFLAGS_SAVED"
+        LDFLAGS="$LDFLAGS_SAVED"
+       CXXFLAGS="$CXXFLAGS_SAVED"
+    fi
+])

Copied: 
gnuradio/branches/features/mp-sched/config/ax_boost_unit_test_framework.m4 
(from rev 8915, 
gnuradio/branches/developers/eb/sched-wip/config/ax_boost_unit_test_framework.m4)
===================================================================
--- gnuradio/branches/features/mp-sched/config/ax_boost_unit_test_framework.m4  
                        (rev 0)
+++ gnuradio/branches/features/mp-sched/config/ax_boost_unit_test_framework.m4  
2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,137 @@
+# ===========================================================================
+#      http://autoconf-archive.cryp.to/ax_boost_unit_test_framework.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_BOOST_UNIT_TEST_FRAMEWORK
+#
+# DESCRIPTION
+#
+#   Test for Unit_Test_Framework library from the Boost C++ libraries. The
+#   macro requires a preceding call to AX_BOOST_BASE. Further documentation
+#   is available at <http://randspringer.de/boost/index.html>.
+#
+#   This macro calls:
+#
+#     AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
+#
+#   And sets:
+#
+#     HAVE_BOOST_UNIT_TEST_FRAMEWORK
+#
+# LAST MODIFICATION
+#
+#   2008-04-12
+#
+# COPYLEFT
+#
+#   Copyright (c) 2008 Thomas Porschberg <address@hidden>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK],
+[
+    AC_ARG_WITH([boost-unit-test-framework],
+    AS_HELP_STRING([--with-boost-unit-test-framework@<:@=special-lib@:>@],
+                   [use the Unit_Test_Framework library from boost - it is 
possible to specify a certain library for the linker
+                        e.g. 
--with-boost-unit-test-framework=boost_unit_test_framework-gcc ]),
+        [
+        if test "$withval" = "no"; then
+            want_boost="no"
+        elif test "$withval" = "yes"; then
+            want_boost="yes"
+            ax_boost_user_unit_test_framework_lib=""
+        else
+            want_boost="yes"
+            ax_boost_user_unit_test_framework_lib="$withval"
+        fi
+        ],
+        [want_boost="yes"]
+    )
+
+    if test "x$want_boost" = "xyes"; then
+        AC_REQUIRE([AC_PROG_CC])
+        CPPFLAGS_SAVED="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+        export CPPFLAGS
+
+        LDFLAGS_SAVED="$LDFLAGS"
+        LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+        export LDFLAGS
+
+        AC_CACHE_CHECK(whether the Boost::Unit_Test_Framework library is 
available,
+                       ax_cv_boost_unit_test_framework,
+        [AC_LANG_PUSH([C++])
+             AC_COMPILE_IFELSE(AC_LANG_PROGRAM(address@hidden:@include 
<boost/test/unit_test.hpp>]],
+                                    [[using boost::unit_test::test_suite;
+                                     test_suite* test= BOOST_TEST_SUITE( "Unit 
test example 1" ); return 0;]]),
+                   ax_cv_boost_unit_test_framework=yes, 
ax_cv_boost_unit_test_framework=no)
+         AC_LANG_POP([C++])
+        ])
+        if test "x$ax_cv_boost_unit_test_framework" = "xyes"; then
+           AC_LANG_PUSH([C++])
+            AC_DEFINE(HAVE_BOOST_UNIT_TEST_FRAMEWORK,,[define if the 
Boost::Unit_Test_Framework library is available])
+            BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
+
+            if test "x$ax_boost_user_unit_test_framework_lib" = "x"; then
+                saved_ldflags="${LDFLAGS}"
+                for monitor_library in `ls 
$BOOSTLIBDIR/libboost_unit_test_framework*.{so,a}* 2>/dev/null` ; do
+                    if test -r $monitor_library ; then
+                       libextension=`echo $monitor_library | sed 's,.*/,,' | 
sed -e 's;^lib\(boost_unit_test_framework.*\)\.so.*$;\1;' -e 
's;^lib\(boost_unit_test_framework.*\)\.a*$;\1;'`
+                       ax_lib=${libextension}
+                       link_unit_test_framework="yes"
+                    else
+                       link_unit_test_framework="no"
+                    fi
+
+                    if test "x$link_unit_test_framework" = "xyes"; then
+                      BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"
+                      AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
+                      break
+                    fi
+                done
+                if test "x$link_unit_test_framework" != "xyes"; then
+                for libextension in `ls 
$BOOSTLIBDIR/boost_unit_test_framework*.{dll,a}* 2>/dev/null  | sed 's,.*/,,' | 
sed -e 's;^\(boost_unit_test_framework.*\)\.dll.*$;\1;' -e 
's;^\(boost_unit_test_framework.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB) link_unit_test_framework="yes"; break],
+                                 [link_unit_test_framework="no"])
+                done
+                fi
+            else
+                link_unit_test_framework="no"
+                saved_ldflags="${LDFLAGS}"
+                for ax_lib in 
boost_unit_test_framework-$ax_boost_user_unit_test_framework_lib 
$ax_boost_user_unit_test_framework_lib ; do
+                   if test "x$link_unit_test_framework" = "xyes"; then
+                      break;
+                   fi
+                   for unittest_library in `ls 
$BOOSTLIBDIR/lib${ax_lib}.{so,a}* 2>/dev/null` ; do
+                   if test -r $unittest_library ; then
+                       libextension=`echo $unittest_library | sed 's,.*/,,' | 
sed -e 's;^lib\(boost_unit_test_framework.*\)\.so.*$;\1;' -e 
's;^lib\(boost_unit_test_framework.*\)\.a*$;\1;'`
+                       ax_lib=${libextension}
+                       link_unit_test_framework="yes"
+                    else
+                       link_unit_test_framework="no"
+                    fi
+
+                    if test "x$link_unit_test_framework" = "xyes"; then
+                        BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"
+                        AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
+                        break
+                    fi
+                  done
+               done
+            fi
+            if test "x$link_unit_test_framework" != "xyes"; then
+                AC_MSG_ERROR(Could not link against $ax_lib !)
+            fi
+           AC_LANG_POP([C++])
+        fi
+
+        CPPFLAGS="$CPPFLAGS_SAVED"
+        LDFLAGS="$LDFLAGS_SAVED"
+    fi
+])

Copied: gnuradio/branches/features/mp-sched/config/ax_boost_wserialization.m4 
(from rev 8915, 
gnuradio/branches/developers/eb/sched-wip/config/ax_boost_wserialization.m4)
===================================================================
--- gnuradio/branches/features/mp-sched/config/ax_boost_wserialization.m4       
                        (rev 0)
+++ gnuradio/branches/features/mp-sched/config/ax_boost_wserialization.m4       
2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,116 @@
+# ===========================================================================
+#        http://autoconf-archive.cryp.to/ax_boost_wserialization.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_BOOST_WSERIALIZATION
+#
+# DESCRIPTION
+#
+#   Test for Serialization library from the Boost C++ libraries. The macro
+#   requires a preceding call to AX_BOOST_BASE. Further documentation is
+#   available at <http://randspringer.de/boost/index.html>.
+#
+#   This macro calls:
+#
+#     AC_SUBST(BOOST_WSERIALIZATION_LIB)
+#
+#   And sets:
+#
+#     HAVE_BOOST_WSERIALIZATION
+#
+# LAST MODIFICATION
+#
+#   2008-04-12
+#
+# COPYLEFT
+#
+#   Copyright (c) 2008 Thomas Porschberg <address@hidden>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_WSERIALIZATION],
+[
+    AC_ARG_WITH([boost-wserialization],
+    AS_HELP_STRING([--with-boost-wserialization@<:@=special-lib@:>@],
+                   [use the WSerialization library from boost -  it is 
possible to specify a certain library for the linker
+                        e.g. 
--with-boost-wserialization=boost_wserialization-gcc-mt-d-1_33_1 ]),
+        [
+        if test "$withval" = "no"; then
+            want_boost="no"
+        elif test "$withval" = "yes"; then
+            want_boost="yes"
+            ax_boost_user_wserialization_lib=""
+        else
+            want_boost="yes"
+            ax_boost_user_wserialization_lib="$withval"
+        fi
+        ],
+        [want_boost="yes"]
+    )
+
+    if test "x$want_boost" = "xyes"; then
+        AC_REQUIRE([AC_PROG_CC])
+        CPPFLAGS_SAVED="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+        export CPPFLAGS
+
+        LDFLAGS_SAVED="$LDFLAGS"
+        LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+        export LDFLAGS
+
+        AC_CACHE_CHECK(whether the Boost::WSerialization library is available,
+                       ax_cv_boost_wserialization,
+        [AC_LANG_PUSH([C++])
+             AC_COMPILE_IFELSE(AC_LANG_PROGRAM(address@hidden:@include 
<fstream>
+                                                 @%:@include 
<boost/archive/text_oarchive.hpp>
+                                                 @%:@include 
<boost/archive/text_iarchive.hpp>
+                                                ]],
+                                   [[std::ofstream ofs("filename");
+                                    boost::archive::text_oarchive oa(ofs);
+                                     return 0;
+                                   ]]),
+                   ax_cv_boost_wserialization=yes, 
ax_cv_boost_wserialization=no)
+         AC_LANG_POP([C++])
+        ])
+        if test "x$ax_cv_boost_wserialization" = "xyes"; then
+           AC_LANG_PUSH([C++])
+            AC_DEFINE(HAVE_BOOST_WSERIALIZATION,,[define if the 
Boost::WSerialization library is available])
+            BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
+            if test "x$ax_boost_user_wserialization_lib" = "x"; then
+                for libextension in `ls 
$BOOSTLIBDIR/libboost_wserialization*.{so,a}* 2>/dev/null | sed 's,.*/,,' | sed 
-e 's;^lib\(boost_wserialization.*\)\.so.*$;\1;' -e 
's;^lib\(boost_wserialization.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_WSERIALIZATION_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_WSERIALIZATION_LIB) link_wserialization="yes"; break],
+                                 [link_wserialization="no"])
+                done
+                if test "x$link_wserialization" != "xyes"; then
+                for libextension in `ls 
$BOOSTLIBDIR/boost_wserialization*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed 
-e 's;^\(boost_wserialization.*\)\.dll.*$;\1;' -e 
's;^\(boost_wserialization.*\)\.a*$;\1;'` ; do
+                     ax_lib=${libextension}
+                    AC_CHECK_LIB($ax_lib, exit,
+                                 [BOOST_WSERIALIZATION_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_WSERIALIZATION_LIB) link_wserialization="yes"; break],
+                                 [link_wserialization="no"])
+                done
+                fi
+
+            else
+               for ax_lib in $ax_boost_user_wserialization_lib 
boost_wserialization-$ax_boost_user_wserialization_lib; do
+                      AC_CHECK_LIB($ax_lib, main,
+                                   [BOOST_WSERIALIZATION_LIB="-l$ax_lib"; 
AC_SUBST(BOOST_WSERIALIZATION_LIB) link_wserialization="yes"; break],
+                                   [link_wserialization="no"])
+                  done
+
+            fi
+            if test "x$link_wserialization" != "xyes"; then
+                AC_MSG_ERROR(Could not link against $ax_lib !)
+            fi
+           AC_LANG_POP([C++])
+        fi
+
+        CPPFLAGS="$CPPFLAGS_SAVED"
+        LDFLAGS="$LDFLAGS_SAVED"
+    fi
+])

Copied: gnuradio/branches/features/mp-sched/config/gr_lib64.m4 (from rev 8915, 
gnuradio/branches/developers/eb/sched-wip/config/gr_lib64.m4)
===================================================================
--- gnuradio/branches/features/mp-sched/config/gr_lib64.m4                      
        (rev 0)
+++ gnuradio/branches/features/mp-sched/config/gr_lib64.m4      2008-07-17 
14:26:51 UTC (rev 8916)
@@ -0,0 +1,57 @@
+dnl
+dnl Copyright 2005,2008 Free Software Foundation, Inc.
+dnl 
+dnl This file is part of GNU Radio
+dnl 
+dnl GNU Radio is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3, or (at your option)
+dnl any later version.
+dnl 
+dnl GNU Radio is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License
+dnl along with GNU Radio; see the file COPYING.  If not, write to
+dnl the Free Software Foundation, Inc., 51 Franklin Street,
+dnl Boston, MA 02110-1301, USA.
+dnl 
+
+# GR_LIB64()
+#
+# Checks to see if we're on a x86_64 or powerpc64 machine, and if so, detemine
+# if libdir should end in "64" or not.
+# 
+# May append "64" to libdir.
+# Sets gr_libdir_suffix to "" or "64"
+#
+AC_DEFUN([GR_LIB64],[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AC_PROG_CXX])
+
+  # If we're using g++, extract the first SEARCH_DIR("...") entry from the 
linker script
+  # and see if it contains a suffix after the final .../lib part of the path.
+  # (This works because the linker script varies depending on whether we're 
generating
+  # 32-bit or 64-bit executables)
+
+  AC_MSG_CHECKING([libdir suffix])
+  if test "$ac_cv_cxx_compiler_gnu" = "yes";
+  then
+    gr_libdir_suffix=`$CXX -Wl,--verbose 2>/dev/null | sed -n -e 
'/SEARCH_DIR/{s/;.*$//; s,^.*/,,; s/".*$//; s/^lib//; p}'`
+  fi
+  AC_MSG_RESULT([$gr_libdir_suffix])
+  AC_SUBST(gr_libdir_suffix)
+
+  if test "$host_cpu" = "x86_64" || test "$host_cpu" = "powerpc64" ; then
+    AC_MSG_CHECKING([libdir for lib64 suffix])
+    t=${libdir##*/lib}
+    if test "$t" != 64 && test "$gr_libdir_suffix" = "64"; then
+      libdir=${libdir}64
+      AC_MSG_RESULT([no. Setting libdir to $libdir])
+    else
+      AC_MSG_RESULT([yes])
+    fi
+  fi
+])

Deleted: gnuradio/branches/features/mp-sched/config/gr_x86_64.m4

Modified: gnuradio/branches/features/mp-sched/config/grc_gnuradio_core.m4
===================================================================
--- gnuradio/branches/features/mp-sched/config/grc_gnuradio_core.m4     
2008-07-17 13:52:07 UTC (rev 8915)
+++ gnuradio/branches/features/mp-sched/config/grc_gnuradio_core.m4     
2008-07-17 14:26:51 UTC (rev 8916)
@@ -28,7 +28,8 @@
        gnuradio_core_PYDIRPATH=$pythondir
     ])
 
-    dnl Don't do gnuradio-core if omnithread skipped
+    dnl Don't do gnuradio-core if gruel or omnithread skipped
+    GRC_CHECK_DEPENDENCY(gnuradio-core, gruel)
     GRC_CHECK_DEPENDENCY(gnuradio-core, omnithread)
 
     dnl If execution gets to here, $passed will be:

Modified: gnuradio/branches/features/mp-sched/configure-cell-cross
===================================================================
--- gnuradio/branches/features/mp-sched/configure-cell-cross    2008-07-17 
13:52:07 UTC (rev 8915)
+++ gnuradio/branches/features/mp-sched/configure-cell-cross    2008-07-17 
14:26:51 UTC (rev 8916)
@@ -31,8 +31,7 @@
 arch=ppu
 cell_root=/mnt/cell-root
 python_version=2.5
-# compiler_includes="-I${cell_root}/usr/include 
-I${cell_root}/usr/local/include -I${cell_root}/usr/lib/gcc/ppu/4.1.1/include 
-I${cell_root}/usr/lib/gcc/ppu/4.1.1/include/c++"
-compiler_includes="-I${cell_root}/usr/include"
+compiler_includes="-isystem ${cell_root}/usr/include"
 
 $scriptdir/configure                       \
     CC=${arch}32-gcc                        \

Modified: gnuradio/branches/features/mp-sched/configure.ac
===================================================================
--- gnuradio/branches/features/mp-sched/configure.ac    2008-07-17 13:52:07 UTC 
(rev 8915)
+++ gnuradio/branches/features/mp-sched/configure.ac    2008-07-17 14:26:51 UTC 
(rev 8916)
@@ -29,7 +29,7 @@
 AM_INIT_AUTOMAKE(gnuradio,3.1svn)
 
 dnl add ${prefix}/lib/pkgconfig to the head of the PKG_CONFIG_PATH
-if test [x]${PKG_CONFIG_PATH} = x; then
+if test x${PKG_CONFIG_PATH} = x; then
     PKG_CONFIG_PATH=${prefix}/lib/pkgconfig
 else
     PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:${PKG_CONFIG_PATH}
@@ -44,9 +44,9 @@
   user_set_cxxflags=yes
 fi
 
-GR_X86_64              dnl check for lib64 suffix
 LF_CONFIGURE_CC
 LF_CONFIGURE_CXX
+GR_LIB64               dnl check for lib64 suffix after choosing compilers
 
 dnl The three macros above are known to override CXXFLAGS if the user
 dnl didn't specify them.  Though I'm sure somebody thought this was
@@ -218,10 +218,24 @@
 CPPUNIT_INCLUDES=$CPPUNIT_CFLAGS
 AC_SUBST(CPPUNIT_INCLUDES)
 
-dnl Define where to find boost includes
-dnl defines BOOST_CFLAGS
-GR_REQUIRE_BOOST_INCLUDES
+dnl
+dnl Move to config subdir when sorted out
+dnl
+dnl calls AC_SUBST(BOOST_CPPFLAGS) and AC_SUBST(BOOST_LDFLAGS)
+dnl and sets HAVE_BOOST
+AX_BOOST_BASE([1.35])
 
+
+dnl calls AC_SUBST(BOOST_THREAD_LIB)
+dnl and sets HAVE_BOOST_THREAD
+AX_BOOST_THREAD
+CXXFLAGS="${CXXFLAGS} $BOOST_CXXFLAGS"
+
+dnl calls AC_SUBST(BOOST_DATE_TIME_LIB)
+dnl and sets HAVE_BOOST_DATE_TIME
+AX_BOOST_DATE_TIME
+
+
 dnl If this is being done from a subversion tree, create variables
 GR_SUBVERSION
 

Modified: gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/Makefile.am
===================================================================
--- gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/Makefile.am       
2008-07-17 13:52:07 UTC (rev 8915)
+++ gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/Makefile.am       
2008-07-17 14:26:51 UTC (rev 8916)
@@ -36,6 +36,8 @@
 libgnuradio_core_qa_la_SOURCES = bug_work_around_6.cc
 libgnuradio_core_qa_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0 \
                                 $(LIBGNURADIO_CORE_EXTRA_LDFLAGS)
+
+
 libgnuradio_core_la_LIBADD  =          \
        filter/libfilter.la             \
        g72x/libccitt.la                \
@@ -47,6 +49,7 @@
        reed-solomon/librs.la           \
        runtime/libruntime.la           \
        $(OMNITHREAD_LA)                \
+       $(GRUEL_LA)                     \
        $(FFTW3F_LIBS)
 
 libgnuradio_core_qa_la_LIBADD  =       \

Modified: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/Makefile.am
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/Makefile.am   
    2008-07-17 13:52:07 UTC (rev 8915)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/Makefile.am   
    2008-07-17 14:26:51 UTC (rev 8916)
@@ -21,7 +21,7 @@
 
 include $(top_srcdir)/Makefile.common
 
-AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES) $(WITH_INCLUDES)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES) 
$(GRUEL_INCLUDES) $(WITH_INCLUDES)
 
 noinst_LTLIBRARIES = libruntime.la libruntime-qa.la
 
@@ -35,6 +35,7 @@
        gr_flat_flowgraph.cc                    \
        gr_block.cc                             \
        gr_block_detail.cc                      \
+       gr_block_executor.cc                    \
        gr_hier_block2.cc                       \
        gr_hier_block2_detail.cc                \
        gr_buffer.cc                            \
@@ -48,16 +49,19 @@
        gr_pagesize.cc                          \
        gr_preferences.cc                       \
        gr_realtime.cc                          \
-       gr_scheduler_thread.cc                  \
+       gr_scheduler.cc                         \
+       gr_scheduler_sts.cc                     \
+       gr_scheduler_tpb.cc                     \
        gr_single_threaded_scheduler.cc         \
        gr_sptr_magic.cc                        \
        gr_sync_block.cc                        \
        gr_sync_decimator.cc                    \
        gr_sync_interpolator.cc                 \
+       gr_tmp_path.cc                          \
        gr_top_block.cc                         \
        gr_top_block_impl.cc                    \
-       gr_top_block_impl_sts.cc                \
-       gr_tmp_path.cc                          \
+       gr_tpb_detail.cc                        \
+       gr_tpb_thread_body.cc                   \
        gr_vmcircbuf.cc                         \
        gr_vmcircbuf_mmap_shm_open.cc           \
        gr_vmcircbuf_mmap_tmpfile.cc            \
@@ -82,6 +86,7 @@
        gr_flat_flowgraph.h                     \
        gr_block.h                              \
        gr_block_detail.h                       \
+       gr_block_executor.h                     \
        gr_hier_block2.h                        \
        gr_hier_block2_detail.h                 \
        gr_buffer.h                             \
@@ -97,7 +102,9 @@
        gr_preferences.h                        \
        gr_realtime.h                           \
        gr_runtime_types.h                      \
-       gr_scheduler_thread.h                   \
+       gr_scheduler.h                          \
+       gr_scheduler_sts.h                      \
+       gr_scheduler_tpb.h                      \
        gr_select_handler.h                     \
        gr_single_threaded_scheduler.h          \
        gr_sptr_magic.h                         \
@@ -106,7 +113,8 @@
        gr_sync_interpolator.h                  \
        gr_top_block.h                          \
        gr_top_block_impl.h                     \
-       gr_top_block_impl_sts.h                 \
+       gr_tpb_detail.h                         \
+       gr_tpb_thread_body.h                    \
        gr_timer.h                              \
        gr_tmp_path.h                           \
        gr_types.h                              \

Modified: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_block.cc
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_block.cc   
    2008-07-17 13:52:07 UTC (rev 8915)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_block.cc   
    2008-07-17 14:26:51 UTC (rev 8916)
@@ -110,3 +110,11 @@
 {
   throw std::runtime_error("Unimplemented");
 }
+
+std::ostream&
+operator << (std::ostream& os, const gr_block *m)
+{
+  os << "<gr_block " << m->name() << " (" << m->unique_id() << ")>";
+  return os;
+}
+

Modified: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_block.h
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_block.h    
    2008-07-17 13:52:07 UTC (rev 8915)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_block.h    
    2008-07-17 14:26:51 UTC (rev 8916)
@@ -214,9 +214,13 @@
 typedef std::vector<gr_block_sptr> gr_block_vector_t;
 typedef std::vector<gr_block_sptr>::iterator gr_block_viter_t;
 
-inline gr_block_sptr make_gr_block_sptr(gr_basic_block_sptr p)
+inline gr_block_sptr cast_to_block_sptr(gr_basic_block_sptr p)
 {
   return boost::dynamic_pointer_cast<gr_block, gr_basic_block>(p);
 }
 
+
+std::ostream&
+operator << (std::ostream& os, const gr_block *m);
+
 #endif /* INCLUDED_GR_BLOCK_H */

Modified: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_block_detail.h
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_block_detail.h
 2008-07-17 13:52:07 UTC (rev 8915)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_block_detail.h
 2008-07-17 14:26:51 UTC (rev 8916)
@@ -24,6 +24,7 @@
 #define INCLUDED_GR_BLOCK_DETAIL_H
 
 #include <gr_runtime_types.h>
+#include <gr_tpb_detail.h>
 #include <stdexcept>
 
 /*!
@@ -34,7 +35,6 @@
  * of almost all users of GNU Radio.  This decoupling also means that
  * we can make changes to the guts without having to recompile everything.
  */
-
 class gr_block_detail {
  public:
   ~gr_block_detail ();
@@ -73,8 +73,14 @@
    */
   void consume_each (int how_many_items);
 
+  /*!
+   * \brief Tell the scheduler \p how_many_items were produced on each output 
stream.
+   */
   void produce_each (int how_many_items);
 
+
+  gr_tpb_detail                             d_tpb;     // used by 
thread-per-block scheduler
+
   // 
----------------------------------------------------------------------------
 
  private:
@@ -84,8 +90,11 @@
   std::vector<gr_buffer_sptr>       d_output;
   bool                               d_done;
 
+
   gr_block_detail (unsigned int ninputs, unsigned int noutputs);
 
+  friend class gr_tpb_detail;
+
   friend gr_block_detail_sptr
   gr_make_block_detail (unsigned int ninputs, unsigned int noutputs);
 };

Copied: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_block_executor.cc
 (from rev 8915, 
gnuradio/branches/developers/eb/sched-wip/gnuradio-core/src/lib/runtime/gr_block_executor.cc)
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_block_executor.cc
                              (rev 0)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_block_executor.cc
      2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,329 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2008 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gr_block_executor.h>
+#include <gr_block.h>
+#include <gr_block_detail.h>
+#include <gr_buffer.h>
+#include <boost/thread.hpp>
+#include <iostream>
+#include <limits>
+#include <assert.h>
+#include <stdio.h>
+
+// must be defined to either 0 or 1
+#define ENABLE_LOGGING 0
+
+#if (ENABLE_LOGGING)
+#define LOG(x) do { x; } while(0)
+#else
+#define LOG(x) do {;} while(0)
+#endif
+
+static int which_scheduler  = 0;
+
+inline static unsigned int
+round_up (unsigned int n, unsigned int multiple)
+{
+  return ((n + multiple - 1) / multiple) * multiple;
+}
+
+inline static unsigned int
+round_down (unsigned int n, unsigned int multiple)
+{
+  return (n / multiple) * multiple;
+}
+
+//
+// Return minimum available write space in all our downstream buffers
+// or -1 if we're output blocked and the output we're blocked
+// on is done.
+//
+static int
+min_available_space (gr_block_detail *d, int output_multiple)
+{
+  int  min_space = std::numeric_limits<int>::max();
+
+  for (int i = 0; i < d->noutputs (); i++){
+    gr_buffer::scoped_lock guard(*d->output(i)->mutex());
+#if 0
+    int n = round_down(d->output(i)->space_available(), output_multiple);
+#else
+    int n = round_down(std::min(d->output(i)->space_available(),
+                               d->output(i)->bufsize()/2),
+                      output_multiple);
+#endif
+    if (n == 0){                       // We're blocked on output.
+      if (d->output(i)->done()){       // Downstream is done, therefore we're 
done.
+       return -1;
+      }
+      return 0;
+    }
+    min_space = std::min (min_space, n);
+  }
+  return min_space;
+}
+
+
+
+gr_block_executor::gr_block_executor (gr_block_sptr block)
+  : d_block(block), d_log(0)
+{
+  if (ENABLE_LOGGING){
+    char name[100];
+    snprintf(name, sizeof(name), "sst-%03d.log", which_scheduler++);
+    d_log = new std::ofstream(name);
+    std::unitbuf(*d_log);              // make it unbuffered...
+    *d_log << "gr_block_executor: "
+          << d_block << std::endl;
+  }
+
+  d_block->start();                    // enable any drivers, etc.
+}
+
+gr_block_executor::~gr_block_executor ()
+{
+  if (ENABLE_LOGGING)
+    delete d_log;
+
+  d_block->stop();                     // stop any drivers, etc.
+}
+
+gr_block_executor::state
+gr_block_executor::run_one_iteration()
+{
+  int                  noutput_items;
+  int                  max_items_avail;
+
+  gr_block             *m = d_block.get();
+  gr_block_detail      *d = m->detail().get();
+
+  LOG(*d_log << std::endl << m);
+
+  if (d->done()){
+    assert(0);
+    return DONE;
+  }
+
+  if (d->source_p ()){
+    d_ninput_items_required.resize (0);
+    d_ninput_items.resize (0);
+    d_input_items.resize (0);
+    d_input_done.resize(0);
+    d_output_items.resize (d->noutputs ());
+
+    // determine the minimum available output space
+    noutput_items = min_available_space (d, m->output_multiple ());
+    LOG(*d_log << " source\n  noutput_items = " << noutput_items << std::endl);
+    if (noutput_items == -1)           // we're done
+      goto were_done;
+
+    if (noutput_items == 0){           // we're output blocked
+      LOG(*d_log << "  BLKD_OUT\n");
+      return BLKD_OUT;
+    }
+
+    goto setup_call_to_work;           // jump to common code
+  }
+
+  else if (d->sink_p ()){
+    d_ninput_items_required.resize (d->ninputs ());
+    d_ninput_items.resize (d->ninputs ());
+    d_input_items.resize (d->ninputs ());
+    d_input_done.resize(d->ninputs());
+    d_output_items.resize (0);
+    LOG(*d_log << " sink\n");
+
+    max_items_avail = 0;
+    for (int i = 0; i < d->ninputs (); i++){
+      {
+       /*
+        * Acquire the mutex and grab local copies of items_available and done.
+        */
+       gr_buffer::scoped_lock guard(*d->input(i)->mutex());
+       d_ninput_items[i] = d->input(i)->items_available();
+       d_input_done[i] = d->input(i)->done();
+      }
+
+      LOG(*d_log << "  d_ninput_items[" << i << "] = " << d_ninput_items[i] << 
std::endl);
+      LOG(*d_log << "  d_input_done[" << i << "] = " << d_input_done[i] << 
std::endl);
+      
+      if (d_ninput_items[i] < m->output_multiple() && d_input_done[i])
+       goto were_done;
+       
+      max_items_avail = std::max (max_items_avail, d_ninput_items[i]);
+    }
+
+    // take a swag at how much output we can sink
+    noutput_items = (int) (max_items_avail * m->relative_rate ());
+    noutput_items = round_down (noutput_items, m->output_multiple ());
+    LOG(*d_log << "  max_items_avail = " << max_items_avail << std::endl);
+    LOG(*d_log << "  noutput_items = " << noutput_items << std::endl);
+
+    if (noutput_items == 0){   // we're blocked on input
+      LOG(*d_log << "  BLKD_IN\n");
+      return BLKD_IN;
+    }
+
+    goto try_again;            // Jump to code shared with regular case.
+  }
+
+  else {
+    // do the regular thing
+    d_ninput_items_required.resize (d->ninputs ());
+    d_ninput_items.resize (d->ninputs ());
+    d_input_items.resize (d->ninputs ());
+    d_input_done.resize(d->ninputs());
+    d_output_items.resize (d->noutputs ());
+
+    max_items_avail = 0;
+    for (int i = 0; i < d->ninputs (); i++){
+      {
+       /*
+        * Acquire the mutex and grab local copies of items_available and done.
+        */
+       gr_buffer::scoped_lock guard(*d->input(i)->mutex());
+       d_ninput_items[i] = d->input(i)->items_available ();
+       d_input_done[i] = d->input(i)->done();
+      }
+      max_items_avail = std::max (max_items_avail, d_ninput_items[i]);
+    }
+
+    // determine the minimum available output space
+    noutput_items = min_available_space (d, m->output_multiple ());
+    if (ENABLE_LOGGING){
+      *d_log << " regular ";
+      if (m->relative_rate() >= 1.0)
+       *d_log << "1:" << m->relative_rate() << std::endl;
+      else
+       *d_log << 1.0/m->relative_rate() << ":1\n";
+      *d_log << "  max_items_avail = " << max_items_avail << std::endl;
+      *d_log << "  noutput_items = " << noutput_items << std::endl;
+    }
+    if (noutput_items == -1)           // we're done
+      goto were_done;
+
+    if (noutput_items == 0){           // we're output blocked
+      LOG(*d_log << "  BLKD_OUT\n");
+      return BLKD_OUT;
+    }
+
+  try_again:
+    if (m->fixed_rate()){
+      // try to work it forward starting with max_items_avail.
+      // We want to try to consume all the input we've got.
+      int reqd_noutput_items = 
m->fixed_rate_ninput_to_noutput(max_items_avail);
+      reqd_noutput_items = round_up(reqd_noutput_items, m->output_multiple());
+      if (reqd_noutput_items > 0 && reqd_noutput_items <= noutput_items)
+       noutput_items = reqd_noutput_items;
+    }
+
+    // ask the block how much input they need to produce noutput_items
+    m->forecast (noutput_items, d_ninput_items_required);
+
+    // See if we've got sufficient input available
+
+    int i;
+    for (i = 0; i < d->ninputs (); i++)
+      if (d_ninput_items_required[i] > d_ninput_items[i])      // not enough
+       break;
+
+    if (i < d->ninputs ()){                    // not enough input on input[i]
+      // if we can, try reducing the size of our output request
+      if (noutput_items > m->output_multiple ()){
+       noutput_items /= 2;
+       noutput_items = round_up (noutput_items, m->output_multiple ());
+       goto try_again;
+      }
+
+      // We're blocked on input
+      LOG(*d_log << "  BLKD_IN\n");
+      if (d_input_done[i])     // If the upstream block is done, we're done
+       goto were_done;
+
+      // Is it possible to ever fulfill this request?
+      if (d_ninput_items_required[i] > 
d->input(i)->max_possible_items_available ()){
+       // Nope, never going to happen...
+       std::cerr << "\nsched: <gr_block " << m->name()
+                 << " (" << m->unique_id() << ")>"
+                 << " is requesting more input data\n"
+                 << "  than we can provide.\n"
+                 << "  ninput_items_required = "
+                 << d_ninput_items_required[i] << "\n"
+                 << "  max_possible_items_available = "
+                 << d->input(i)->max_possible_items_available() << "\n"
+                 << "  If this is a filter, consider reducing the number of 
taps.\n";
+       goto were_done;
+      }
+
+      return BLKD_IN;
+    }
+
+    // We've got enough data on each input to produce noutput_items.
+    // Finish setting up the call to work.
+
+    for (int i = 0; i < d->ninputs (); i++)
+      d_input_items[i] = d->input(i)->read_pointer();
+
+  setup_call_to_work:
+
+    for (int i = 0; i < d->noutputs (); i++)
+      d_output_items[i] = d->output(i)->write_pointer();
+
+    // Do the actual work of the block
+    int n = m->general_work (noutput_items, d_ninput_items,
+                            d_input_items, d_output_items);
+    LOG(*d_log << "  general_work: noutput_items = " << noutput_items
+       << " result = " << n << std::endl);
+
+    if (n == -1)               // block is done
+      goto were_done;
+
+    d->produce_each (n);       // advance write pointers
+    if (n > 0)
+      return READY;
+
+    // We didn't produce any output even though we called general_work.
+    // We have (most likely) consumed some input.
+
+    // If this is a source, it's broken.
+    if (d->source_p()){
+      std::cerr << "gr_block_executor: source " << m
+               << " returned 0 from work.  We're marking it DONE.\n";
+      // FIXME maybe we ought to raise an exception...
+      goto were_done;
+    }
+
+    // Have the caller try again...
+    return READY_NO_OUTPUT;
+  }
+  assert (0);
+    
+ were_done:
+  LOG(*d_log << "  were_done\n");
+  d->set_done (true);
+  return DONE;
+}

Copied: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_block_executor.h
 (from rev 8915, 
gnuradio/branches/developers/eb/sched-wip/gnuradio-core/src/lib/runtime/gr_block_executor.h)
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_block_executor.h
                               (rev 0)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_block_executor.h
       2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,69 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2008 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_GR_BLOCK_EXECUTOR_H
+#define INCLUDED_GR_BLOCK_EXECUTOR_H
+
+#include <gr_runtime_types.h>
+#include <fstream>
+
+//class gr_block_executor;
+//typedef boost::shared_ptr<gr_block_executor> gr_block_executor_sptr;
+
+
+/*!
+ * \brief Manage the execution of a single block.
+ * \ingroup internal
+ */
+
+class gr_block_executor {
+protected:
+  gr_block_sptr                        d_block;        // The block we're 
trying to run
+  std::ofstream                       *d_log;
+
+  // These are allocated here so we don't have to on each iteration
+
+  gr_vector_int                        d_ninput_items_required;
+  gr_vector_int                        d_ninput_items;
+  gr_vector_const_void_star    d_input_items;
+  std::vector<bool>            d_input_done;
+  gr_vector_void_star          d_output_items;
+
+ public:
+  gr_block_executor(gr_block_sptr block);
+  ~gr_block_executor ();
+
+  enum state {
+    READY,           // We made progress; everything's cool.
+    READY_NO_OUTPUT,  // We consumed some input, but produced no output.
+    BLKD_IN,         // no progress; we're blocked waiting for input data.
+    BLKD_OUT,        // no progress; we're blocked waiting for output buffer 
space.
+    DONE,            // we're done; don't call me again.
+  };
+
+  /*
+   * \brief Run one iteration.
+   */
+  state run_one_iteration();
+};
+
+#endif /* INCLUDED_GR_BLOCK_EXECUTOR_H */

Modified: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_buffer.cc
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_buffer.cc  
    2008-07-17 13:52:07 UTC (rev 8915)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_buffer.cc  
    2008-07-17 14:26:51 UTC (rev 8916)
@@ -77,10 +77,10 @@
 }
 
 
-gr_buffer::gr_buffer (int nitems, size_t sizeof_item)
+gr_buffer::gr_buffer (int nitems, size_t sizeof_item, gr_block_sptr link)
   : d_base (0), d_bufsize (0), d_vmcircbuf (0),
-    d_sizeof_item (sizeof_item), d_write_index (0),
-    d_done (false)
+    d_sizeof_item (sizeof_item), d_link(link),
+    d_write_index (0), d_done (false)
 {
   if (!allocate_buffer (nitems, sizeof_item))
     throw std::bad_alloc ();
@@ -89,9 +89,9 @@
 }
 
 gr_buffer_sptr 
-gr_make_buffer (int nitems, size_t sizeof_item)
+gr_make_buffer (int nitems, size_t sizeof_item, gr_block_sptr link)
 {
-  return gr_buffer_sptr (new gr_buffer (nitems, sizeof_item));
+  return gr_buffer_sptr (new gr_buffer (nitems, sizeof_item, link));
 }
 
 gr_buffer::~gr_buffer ()
@@ -146,7 +146,7 @@
 
 
 int
-gr_buffer::space_available () const
+gr_buffer::space_available ()
 {
   if (d_readers.empty ())
     return d_bufsize - 1;      // See comment below
@@ -175,18 +175,27 @@
 void
 gr_buffer::update_write_pointer (int nitems)
 {
+  scoped_lock  guard(*mutex());
   d_write_index = index_add (d_write_index, nitems);
 }
 
+void
+gr_buffer::set_done (bool done)
+{
+  scoped_lock  guard(*mutex());
+  d_done = done;
+}
+
 gr_buffer_reader_sptr
-gr_buffer_add_reader (gr_buffer_sptr buf, int nzero_preload)
+gr_buffer_add_reader (gr_buffer_sptr buf, int nzero_preload, gr_block_sptr 
link)
 {
   if (nzero_preload < 0)
     throw std::invalid_argument("gr_buffer_add_reader: nzero_preload must be 
>= 0");
 
   gr_buffer_reader_sptr r (new gr_buffer_reader (buf,
                                                 
buf->index_sub(buf->d_write_index,
-                                                               
nzero_preload)));
+                                                               nzero_preload),
+                                                link));
   buf->d_readers.push_back (r.get ());
 
   return r;
@@ -214,8 +223,9 @@
 
 // ----------------------------------------------------------------------------
 
-gr_buffer_reader::gr_buffer_reader (gr_buffer_sptr buffer, unsigned int 
read_index)
-  : d_buffer (buffer), d_read_index (read_index)
+gr_buffer_reader::gr_buffer_reader(gr_buffer_sptr buffer, unsigned int 
read_index,
+                                  gr_block_sptr link)
+  : d_buffer(buffer), d_read_index(read_index), d_link(link)
 {
   s_buffer_reader_count++;
 }
@@ -241,6 +251,7 @@
 void
 gr_buffer_reader::update_read_pointer (int nitems)
 {
+  scoped_lock  guard(*mutex());
   d_read_index = d_buffer->index_add (d_read_index, nitems);
 }
 

Modified: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_buffer.h
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_buffer.h   
    2008-07-17 13:52:07 UTC (rev 8915)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_buffer.h   
    2008-07-17 14:26:51 UTC (rev 8916)
@@ -24,6 +24,8 @@
 #define INCLUDED_GR_BUFFER_H
 
 #include <gr_runtime_types.h>
+#include <boost/weak_ptr.hpp>
+#include <boost/thread.hpp>
 
 class gr_vmcircbuf;
 
@@ -33,8 +35,12 @@
  * The total size of the buffer will be rounded up to a system
  * dependent boundary.  This is typically the system page size, but
  * under MS windows is 64KB.
+ *
+ * \param nitems is the minimum number of items the buffer will hold.
+ * \param sizeof_item is the size of an item in bytes.
+ * \param link is the buffer that writes to this buffer.
  */
-gr_buffer_sptr gr_make_buffer (int nitems, size_t sizeof_item);
+gr_buffer_sptr gr_make_buffer (int nitems, size_t sizeof_item, gr_block_sptr 
link=gr_block_sptr());
 
 
 /*!
@@ -43,14 +49,22 @@
  */
 class gr_buffer {
  public:
+
+  typedef boost::unique_lock<boost::mutex>  scoped_lock;
+
   virtual ~gr_buffer ();
 
   /*!
    * \brief return number of items worth of space available for writing
    */
-  int space_available () const;
+  int space_available ();
 
   /*!
+   * \brief return size of this buffer in items
+   */
+  int bufsize() const { return d_bufsize; }
+
+  /*!
    * \brief return pointer to write buffer.
    *
    * The return value points at space that can hold at least
@@ -63,17 +77,26 @@
    */
   void update_write_pointer (int nitems);
 
-
-  void set_done (bool done)   { d_done = done; }
+  void set_done (bool done);
   bool done () const { return d_done; }
 
+  /*!
+   * \brief Return the block that writes this buffer.
+   */
+  gr_block_sptr link() { return gr_block_sptr(d_link); }
+
+  size_t nreaders() const { return d_readers.size(); }
+  gr_buffer_reader* reader(size_t index) { return d_readers[index]; }
+
+  boost::mutex *mutex() { return &d_mutex; }
+
   // -------------------------------------------------------------------------
 
  private:
 
   friend class gr_buffer_reader;
-  friend gr_buffer_sptr gr_make_buffer (int nitems, size_t sizeof_item);
-  friend gr_buffer_reader_sptr gr_buffer_add_reader (gr_buffer_sptr buf, int 
nzero_preload);
+  friend gr_buffer_sptr gr_make_buffer (int nitems, size_t sizeof_item, 
gr_block_sptr link);
+  friend gr_buffer_reader_sptr gr_buffer_add_reader (gr_buffer_sptr buf, int 
nzero_preload, gr_block_sptr link);
 
  protected:
   char                                *d_base;         // base address of 
buffer
@@ -81,8 +104,14 @@
  private:
   gr_vmcircbuf                        *d_vmcircbuf;
   size_t                               d_sizeof_item;  // in bytes
+  std::vector<gr_buffer_reader *>      d_readers;
+  boost::weak_ptr<gr_block>            d_link;         // block that writes 
this buffer
+
+  //
+  // The mutex protects d_write_index, d_done and the d_read_index's in the 
buffer readers.
+  //
+  boost::mutex                         d_mutex;
   unsigned int                         d_write_index;  // in items 
[0,d_bufsize)
-  std::vector<gr_buffer_reader *>      d_readers;
   bool                                 d_done;
   
   unsigned
@@ -116,11 +145,15 @@
    *
    * Allocate a buffer that holds at least \p nitems of size \p sizeof_item.
    *
+   * \param nitems is the minimum number of items the buffer will hold.
+   * \param sizeof_item is the size of an item in bytes.
+   * \param link is the buffer that writes to this buffer.
+   *
    * The total size of the buffer will be rounded up to a system
    * dependent boundary.  This is typically the system page size, but
    * under MS windows is 64KB.
    */
-  gr_buffer (int nitems, size_t sizeof_item);
+  gr_buffer (int nitems, size_t sizeof_item, gr_block_sptr link);
 
   /*!
    * \brief disassociate \p reader from this buffer
@@ -132,8 +165,10 @@
 /*!
  * \brief create a new gr_buffer_reader and attach it to buffer \p buf
  * \param nzero_preload -- number of zero items to "preload" into buffer.
+ * \param link is the buffer that reads using this gr_buffer_reader.
  */
-gr_buffer_reader_sptr gr_buffer_add_reader (gr_buffer_sptr buf, int 
nzero_preload);
+gr_buffer_reader_sptr 
+gr_buffer_add_reader (gr_buffer_sptr buf, int nzero_preload, gr_block_sptr 
link=gr_block_sptr());
 
 //! returns # of gr_buffers currently allocated
 long gr_buffer_ncurrently_allocated ();
@@ -147,8 +182,10 @@
  */
 
 class gr_buffer_reader {
+ public:
 
- public:
+  typedef gr_buffer::scoped_lock scoped_lock;
+
   ~gr_buffer_reader ();
 
   /*!
@@ -183,19 +220,29 @@
   void set_done (bool done)   { d_buffer->set_done (done); }
   bool done () const { return d_buffer->done (); }
 
+  boost::mutex *mutex() { return d_buffer->mutex(); }
+
+
+  /*!
+   * \brief Return the block that reads via this reader.
+   */
+  gr_block_sptr link() { return gr_block_sptr(d_link); }
+
   // -------------------------------------------------------------------------
 
  private:
 
   friend class gr_buffer;
-  friend gr_buffer_reader_sptr gr_buffer_add_reader (gr_buffer_sptr buf, int 
nzero_preload);
+  friend gr_buffer_reader_sptr 
+  gr_buffer_add_reader (gr_buffer_sptr buf, int nzero_preload, gr_block_sptr 
link);
 
 
   gr_buffer_sptr               d_buffer;
   unsigned int                 d_read_index;   // in items 
[0,d->buffer.d_bufsize)
+  boost::weak_ptr<gr_block>    d_link;         // block that reads via this 
buffer reader
 
   //! constructor is private.  Use gr_buffer::add_reader to create instances
-  gr_buffer_reader (gr_buffer_sptr buffer, unsigned int read_index);
+  gr_buffer_reader (gr_buffer_sptr buffer, unsigned int read_index, 
gr_block_sptr link);
 };
 
 //! returns # of gr_buffer_readers currently allocated

Modified: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_buffer.i
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_buffer.i   
    2008-07-17 13:52:07 UTC (rev 8915)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_buffer.i   
    2008-07-17 14:26:51 UTC (rev 8916)
@@ -26,14 +26,14 @@
 %rename(buffer) gr_make_buffer;
 %ignore gr_buffer;
 
-gr_buffer_sptr gr_make_buffer (int nitems, size_t sizeof_item);
+gr_buffer_sptr gr_make_buffer (int nitems, size_t sizeof_item, gr_block_sptr 
link);
 
 class gr_buffer {
  public:
   ~gr_buffer ();
 
  private:
-  gr_buffer (int nitems, size_t sizeof_item);
+  gr_buffer (int nitems, size_t sizeof_item, gr_block_sptr link);
 };
   
 
@@ -43,7 +43,7 @@
 %ignore gr_buffer_reader;
 
 %rename(buffer_add_reader) gr_buffer_add_reader;
-gr_buffer_reader_sptr gr_buffer_add_reader (gr_buffer_sptr buf, int 
nzero_preload);
+gr_buffer_reader_sptr gr_buffer_add_reader (gr_buffer_sptr buf, int 
nzero_preload, gr_block_sptr link);
 
 class gr_buffer_reader {
  public:
@@ -51,7 +51,7 @@
 
  private:
   friend class gr_buffer;
-  gr_buffer_reader (gr_buffer_sptr buffer, unsigned int read_index);
+  gr_buffer_reader (gr_buffer_sptr buffer, unsigned int read_index, 
gr_block_sptr link);
 };
 
 

Modified: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_flat_flowgraph.cc
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_flat_flowgraph.cc
      2008-07-17 13:52:07 UTC (rev 8915)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_flat_flowgraph.cc
      2008-07-17 14:26:51 UTC (rev 8916)
@@ -33,6 +33,11 @@
 
 #define GR_FLAT_FLOWGRAPH_DEBUG 0
 
+// 32Kbyte buffer size between blocks
+#define GR_FIXED_BUFFER_SIZE (32*(1L<<10))
+
+static const unsigned int s_fixed_buffer_size = GR_FIXED_BUFFER_SIZE;
+
 gr_flat_flowgraph_sptr
 gr_make_flat_flowgraph()
 {
@@ -54,7 +59,7 @@
 
   // Assign block details to blocks
   for (gr_basic_block_viter_t p = blocks.begin(); p != blocks.end(); p++)
-    make_gr_block_sptr(*p)->set_detail(allocate_block_detail(*p));
+    cast_to_block_sptr(*p)->set_detail(allocate_block_detail(*p));
 
   // Connect inputs to outputs for each block
   for(gr_basic_block_viter_t p = blocks.begin(); p != blocks.end(); p++)
@@ -84,12 +89,16 @@
 gr_buffer_sptr
 gr_flat_flowgraph::allocate_buffer(gr_basic_block_sptr block, int port)
 {
-  gr_block_sptr grblock = make_gr_block_sptr(block);
+  gr_block_sptr grblock = cast_to_block_sptr(block);
   if (!grblock)
     throw std::runtime_error("allocate_buffer found non-gr_block");
   int item_size = block->output_signature()->sizeof_stream_item(port);
-  int nitems = s_fixed_buffer_size/item_size;
 
+  // *2 because we're now only filling them 1/2 way in order to
+  // increase the available parallelism when using the TPB scheduler.
+  // (We're double buffering, where we used to single buffer)
+  int nitems = s_fixed_buffer_size * 2 / item_size;
+
   // Make sure there are at least twice the output_multiple no. of items
   if (nitems < 2*grblock->output_multiple())   // Note: this means 
output_multiple()
     nitems = 2*grblock->output_multiple();     // can't be changed by block 
dynamically
@@ -99,7 +108,7 @@
   gr_basic_block_vector_t blocks = calc_downstream_blocks(block, port);
 
   for (gr_basic_block_viter_t p = blocks.begin(); p != blocks.end(); p++) {
-    gr_block_sptr dgrblock = make_gr_block_sptr(*p);
+    gr_block_sptr dgrblock = cast_to_block_sptr(*p);
     if (!dgrblock)
       throw std::runtime_error("allocate_buffer found non-gr_block");
 
@@ -109,13 +118,13 @@
     nitems = std::max(nitems, 
static_cast<int>(2*(decimation*multiple+history)));
   }
 
-  return gr_make_buffer(nitems, item_size);
+  return gr_make_buffer(nitems, item_size, grblock);
 }
 
 void
 gr_flat_flowgraph::connect_block_inputs(gr_basic_block_sptr block)
 {
-  gr_block_sptr grblock = make_gr_block_sptr(block);
+  gr_block_sptr grblock = cast_to_block_sptr(block);
   if (!grblock)
     throw std::runtime_error("connect_block_inputs found non-gr_block");
   
@@ -130,7 +139,7 @@
     int dst_port = e->dst().port();
     int src_port = e->src().port();
     gr_basic_block_sptr src_block = e->src().block();
-    gr_block_sptr src_grblock = make_gr_block_sptr(src_block);
+    gr_block_sptr src_grblock = cast_to_block_sptr(src_block);
     if (!src_grblock)
       throw std::runtime_error("connect_block_inputs found non-gr_block");
     gr_buffer_sptr src_buffer = src_grblock->detail()->output(src_port);
@@ -138,7 +147,7 @@
     if (GR_FLAT_FLOWGRAPH_DEBUG)
       std::cout << "Setting input " << dst_port << " from edge " << (*e) << 
std::endl;
 
-    detail->set_input(dst_port, gr_buffer_add_reader(src_buffer, 
grblock->history()-1));
+    detail->set_input(dst_port, gr_buffer_add_reader(src_buffer, 
grblock->history()-1, grblock));
   }
 }
 
@@ -149,7 +158,7 @@
   // by flattening will need one; existing blocks still in the new flowgraph 
will
   // already have one.
   for (gr_basic_block_viter_t p = d_blocks.begin(); p != d_blocks.end(); p++) {
-    gr_block_sptr block = make_gr_block_sptr(*p);
+    gr_block_sptr block = cast_to_block_sptr(*p);
     
     if (!block->detail()) {
       if (GR_FLAT_FLOWGRAPH_DEBUG)
@@ -177,7 +186,7 @@
       if (GR_FLAT_FLOWGRAPH_DEBUG)
        std::cout << "not in new edge list" << std::endl;
       // zero the buffer reader on RHS of old edge
-      gr_block_sptr block(make_gr_block_sptr(old_edge->dst().block()));
+      gr_block_sptr block(cast_to_block_sptr(old_edge->dst().block()));
       int port = old_edge->dst().port();
       block->detail()->set_input(port, gr_buffer_reader_sptr());
     }
@@ -189,7 +198,7 @@
 
   // Now connect inputs to outputs, reusing old buffer readers if they exist
   for (gr_basic_block_viter_t p = d_blocks.begin(); p != d_blocks.end(); p++) {
-    gr_block_sptr block = make_gr_block_sptr(*p);
+    gr_block_sptr block = cast_to_block_sptr(*p);
 
     if (GR_FLAT_FLOWGRAPH_DEBUG)
       std::cout << "merge: merging " << (*p) << "...";
@@ -208,7 +217,7 @@
        gr_edge edge = calc_upstream_edge(*p, i);
 
        // Fish out old buffer reader and see if it matches correct buffer from 
edge list
-       gr_block_sptr src_block = make_gr_block_sptr(edge.src().block());
+       gr_block_sptr src_block = cast_to_block_sptr(edge.src().block());
        gr_block_detail_sptr src_detail = src_block->detail();
        gr_buffer_sptr src_buffer = src_detail->output(edge.src().port());
        gr_buffer_reader_sptr old_reader;
@@ -225,7 +234,7 @@
            std::cout << "needs a new reader" << std::endl;
 
          // Create new buffer reader and assign
-         detail->set_input(i, gr_buffer_add_reader(src_buffer, 
block->history()-1));
+         detail->set_input(i, gr_buffer_add_reader(src_buffer, 
block->history()-1, block));
        }
       }
     }
@@ -248,7 +257,7 @@
 
   for (gr_basic_block_viter_t p = d_blocks.begin(); p != d_blocks.end(); p++) {
     std::cout << " block: " << (*p) << std::endl;
-    gr_block_detail_sptr detail = make_gr_block_sptr(*p)->detail();
+    gr_block_detail_sptr detail = cast_to_block_sptr(*p)->detail();
     std::cout << "  detail @" << detail << ":" << std::endl;
      
     int ni = detail->ninputs();
@@ -269,3 +278,14 @@
   }
 
 }
+
+gr_block_vector_t
+gr_flat_flowgraph::make_block_vector(gr_basic_block_vector_t &blocks)
+{
+  gr_block_vector_t result;
+  for (gr_basic_block_viter_t p = blocks.begin(); p != blocks.end(); p++) {
+    result.push_back(cast_to_block_sptr(*p));
+  }
+
+  return result;
+}

Modified: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_flat_flowgraph.h
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_flat_flowgraph.h
       2008-07-17 13:52:07 UTC (rev 8915)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_flat_flowgraph.h
       2008-07-17 14:26:51 UTC (rev 8916)
@@ -26,9 +26,6 @@
 #include <gr_flowgraph.h>
 #include <gr_block.h>
 
-// 32Kbyte buffer size between blocks
-#define GR_FIXED_BUFFER_SIZE (32*(1L<<10))
-
 // Create a shared pointer to a heap allocated gr_flat_flowgraph
 // (types defined in gr_runtime_types.h)
 gr_flat_flowgraph_sptr gr_make_flat_flowgraph();
@@ -55,10 +52,14 @@
 
   void dump();
 
+  /*!
+   * Make a vector of gr_block from a vector of gr_basic_block
+   */
+  static gr_block_vector_t make_block_vector(gr_basic_block_vector_t &blocks);
+
 private:
   gr_flat_flowgraph();
 
-  static const unsigned int s_fixed_buffer_size = GR_FIXED_BUFFER_SIZE;
   gr_block_detail_sptr allocate_block_detail(gr_basic_block_sptr block);
   gr_buffer_sptr allocate_buffer(gr_basic_block_sptr block, int port);
   void connect_block_inputs(gr_basic_block_sptr block);

Modified: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_flowgraph.h
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_flowgraph.h
    2008-07-17 13:52:07 UTC (rev 8915)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_flowgraph.h
    2008-07-17 14:26:51 UTC (rev 8916)
@@ -122,6 +122,9 @@
   // Return vector of connected blocks
   gr_basic_block_vector_t calc_used_blocks();
 
+  // Return toplogically sorted vector of blocks.  All the sources come first.
+  gr_basic_block_vector_t topological_sort(gr_basic_block_vector_t &blocks);
+
   // Return vector of vectors of disjointly connected blocks, topologically
   // sorted.
   std::vector<gr_basic_block_vector_t> partition();
@@ -149,7 +152,6 @@
   gr_basic_block_vector_t calc_reachable_blocks(gr_basic_block_sptr block, 
gr_basic_block_vector_t &blocks);
   void reachable_dfs_visit(gr_basic_block_sptr block, gr_basic_block_vector_t 
&blocks);
   gr_basic_block_vector_t calc_adjacent_blocks(gr_basic_block_sptr block, 
gr_basic_block_vector_t &blocks);
-  gr_basic_block_vector_t topological_sort(gr_basic_block_vector_t &blocks);
   gr_basic_block_vector_t sort_sources_first(gr_basic_block_vector_t &blocks);
   bool source_p(gr_basic_block_sptr block);
   void topological_dfs_visit(gr_basic_block_sptr block, 
gr_basic_block_vector_t &output);

Modified: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc
  2008-07-17 13:52:07 UTC (rev 8915)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc
  2008-07-17 14:26:51 UTC (rev 8916)
@@ -303,7 +303,7 @@
   std::stringstream msg;
 
   // Check if endpoint is a leaf node
-  if (make_gr_block_sptr(endp.block()))
+  if (cast_to_block_sptr(endp.block()))
     return endp;
   
   // Check if endpoint is a hierarchical block

Copied: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler.cc
 (from rev 8915, 
gnuradio/branches/developers/eb/sched-wip/gnuradio-core/src/lib/runtime/gr_scheduler.cc)
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler.cc
                           (rev 0)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler.cc
   2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,33 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <gr_scheduler.h>
+
+gr_scheduler::gr_scheduler(gr_flat_flowgraph_sptr ffg)
+{
+}
+
+gr_scheduler::~gr_scheduler()
+{
+}

Copied: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler.h
 (from rev 8915, 
gnuradio/branches/developers/eb/sched-wip/gnuradio-core/src/lib/runtime/gr_scheduler.h)
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler.h
                            (rev 0)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler.h
    2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,64 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef INCLUDED_GR_SCHEDULER_H
+#define INCLUDED_GR_SCHEDULER_H
+
+#include <boost/utility.hpp>
+#include <gr_block.h>
+#include <gr_flat_flowgraph.h>
+
+
+class gr_scheduler;
+typedef boost::shared_ptr<gr_scheduler> gr_scheduler_sptr;
+
+
+/*!
+ * \brief Abstract scheduler that takes a flattened flow graph and runs it.
+ *
+ * Preconditions: details, buffers and buffer readers have been assigned.
+ */
+class gr_scheduler : boost::noncopyable
+{
+
+public:
+  /*!
+   * \brief Construct a scheduler and begin evaluating the graph.
+   *
+   * The scheduler will continue running until all blocks until they
+   * report that they are done or the stop method is called.
+   */
+  gr_scheduler(gr_flat_flowgraph_sptr ffg);
+
+  virtual ~gr_scheduler();
+
+  /*!
+   * \brief Tell the scheduler to stop executing.
+   */
+  virtual void stop() = 0;
+
+  /*!
+   * \brief Block until the graph is done.
+   */
+  virtual void wait() = 0;
+};
+
+#endif /* INCLUDED_GR_SCHEDULER_H */

Copied: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler_sts.cc
 (from rev 8915, 
gnuradio/branches/developers/eb/sched-wip/gnuradio-core/src/lib/runtime/gr_scheduler_sts.cc)
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler_sts.cc
                               (rev 0)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler_sts.cc
       2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,87 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <gr_scheduler_sts.h>
+#include <gr_single_threaded_scheduler.h>
+#include <gruel/thread_body_wrapper.h>
+
+class sts_container
+{
+  gr_block_vector_t    d_blocks;
+  
+public:
+
+  sts_container(gr_block_vector_t blocks)
+    : d_blocks(blocks) {}
+
+  void operator()()
+  {
+    gr_make_single_threaded_scheduler(d_blocks)->run();
+  }
+};
+
+
+gr_scheduler_sptr
+gr_scheduler_sts::make(gr_flat_flowgraph_sptr ffg)
+{
+  return gr_scheduler_sptr(new gr_scheduler_sts(ffg));
+}
+
+gr_scheduler_sts::gr_scheduler_sts(gr_flat_flowgraph_sptr ffg)
+  : gr_scheduler(ffg)
+{
+  // Split the flattened flow graph into discrete partitions, each
+  // of which is topologically sorted.
+
+  std::vector<gr_basic_block_vector_t> graphs = ffg->partition();
+
+  // For each partition, create a thread to evaluate it using
+  // an instance of the gr_single_threaded_scheduler
+
+  for (std::vector<gr_basic_block_vector_t>::iterator p = graphs.begin();
+       p != graphs.end(); p++) {
+
+    gr_block_vector_t blocks = gr_flat_flowgraph::make_block_vector(*p);
+    d_threads.create_thread(
+        gruel::thread_body_wrapper<sts_container>(sts_container(blocks),
+                                                 "single-threaded-scheduler"));
+  }
+}
+
+gr_scheduler_sts::~gr_scheduler_sts()
+{
+  stop();
+}
+
+void
+gr_scheduler_sts::stop()
+{
+  d_threads.interrupt_all();
+}
+
+void
+gr_scheduler_sts::wait()
+{
+  d_threads.join_all();
+}

Copied: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler_sts.h
 (from rev 8915, 
gnuradio/branches/developers/eb/sched-wip/gnuradio-core/src/lib/runtime/gr_scheduler_sts.h)
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler_sts.h
                                (rev 0)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler_sts.h
        2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,62 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_GR_SCHEDULER_STS_H
+#define INCLUDED_GR_SCHEDULER_STS_H
+
+#include <gr_scheduler.h>
+#include <gruel/thread_group.h>
+
+/*!
+ * \brief Concrete scheduler that uses the single_threaded_scheduler
+ */
+class gr_scheduler_sts : public gr_scheduler
+{
+  gruel::thread_group                 d_threads;
+
+protected:
+  /*!
+   * \brief Construct a scheduler and begin evaluating the graph.
+   *
+   * The scheduler will continue running until all blocks until they
+   * report that they are done or the stop method is called.
+   */
+  gr_scheduler_sts(gr_flat_flowgraph_sptr ffg);
+
+public:
+  static gr_scheduler_sptr make(gr_flat_flowgraph_sptr ffg);
+
+  ~gr_scheduler_sts();
+
+  /*!
+   * \brief Tell the scheduler to stop executing.
+   */
+  void stop();
+
+  /*!
+   * \brief Block until the graph is done.
+   */
+  void wait();
+};
+
+
+
+
+#endif /* INCLUDED_GR_SCHEDULER_STS_H */

Deleted: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler_thread.cc

Deleted: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler_thread.h

Copied: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler_tpb.cc
 (from rev 8915, 
gnuradio/branches/developers/eb/sched-wip/gnuradio-core/src/lib/runtime/gr_scheduler_tpb.cc)
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler_tpb.cc
                               (rev 0)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler_tpb.cc
       2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,95 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <gr_scheduler_tpb.h>
+#include <gr_tpb_thread_body.h>
+#include <gruel/thread_body_wrapper.h>
+#include <sstream>
+
+/*
+ * You know, a lambda expression would be sooo much easier...
+ */
+class tpb_container
+{
+  gr_block_sptr        d_block;
+  
+public:
+  tpb_container(gr_block_sptr block) : d_block(block) {}
+
+  void operator()()
+  {
+    gr_tpb_thread_body body(d_block);
+  }
+};
+
+
+gr_scheduler_sptr
+gr_scheduler_tpb::make(gr_flat_flowgraph_sptr ffg)
+{
+  return gr_scheduler_sptr(new gr_scheduler_tpb(ffg));
+}
+
+gr_scheduler_tpb::gr_scheduler_tpb(gr_flat_flowgraph_sptr ffg)
+  : gr_scheduler(ffg)
+{
+  // Get a topologically sorted vector of all the blocks in use.
+  // Being topologically sorted probably isn't going to matter, but
+  // there's a non-zero chance it might help...
+
+  gr_basic_block_vector_t used_blocks = ffg->calc_used_blocks();
+  used_blocks = ffg->topological_sort(used_blocks);
+  gr_block_vector_t blocks = gr_flat_flowgraph::make_block_vector(used_blocks);
+
+  // Ensure that the done flag is clear on all blocks
+
+  for (size_t i = 0; i < blocks.size(); i++){
+    blocks[i]->detail()->set_done(false);
+  }
+
+  // Fire off a thead for each block
+
+  for (size_t i = 0; i < blocks.size(); i++){
+    std::stringstream name;
+    name << "thread-per-block[" << i << "]: " << blocks[i];
+    d_threads.create_thread(
+      gruel::thread_body_wrapper<tpb_container>(tpb_container(blocks[i]), 
name.str()));
+  }
+}
+
+gr_scheduler_tpb::~gr_scheduler_tpb()
+{
+  stop();
+}
+
+void
+gr_scheduler_tpb::stop()
+{
+  d_threads.interrupt_all();
+}
+
+void
+gr_scheduler_tpb::wait()
+{
+  d_threads.join_all();
+}

Copied: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler_tpb.h
 (from rev 8915, 
gnuradio/branches/developers/eb/sched-wip/gnuradio-core/src/lib/runtime/gr_scheduler_tpb.h)
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler_tpb.h
                                (rev 0)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_scheduler_tpb.h
        2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,60 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_GR_SCHEDULER_TPB_H
+#define INCLUDED_GR_SCHEDULER_TPB_H
+
+#include <gr_scheduler.h>
+#include <gruel/thread_group.h>
+
+/*!
+ * \brief Concrete scheduler that uses a kernel thread-per-block
+ */
+class gr_scheduler_tpb : public gr_scheduler
+{
+  gruel::thread_group                 d_threads;
+
+protected:
+  /*!
+   * \brief Construct a scheduler and begin evaluating the graph.
+   *
+   * The scheduler will continue running until all blocks until they
+   * report that they are done or the stop method is called.
+   */
+  gr_scheduler_tpb(gr_flat_flowgraph_sptr ffg);
+
+public:
+  static gr_scheduler_sptr make(gr_flat_flowgraph_sptr ffg);
+
+  ~gr_scheduler_tpb();
+
+  /*!
+   * \brief Tell the scheduler to stop executing.
+   */
+  void stop();
+
+  /*!
+   * \brief Block until the graph is done.
+   */
+  void wait();
+};
+
+
+#endif /* INCLUDED_GR_SCHEDULER_TPB_H */

Modified: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.cc
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.cc
   2008-07-17 13:52:07 UTC (rev 8915)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.cc
   2008-07-17 14:26:51 UTC (rev 8916)
@@ -28,6 +28,7 @@
 #include <gr_block.h>
 #include <gr_block_detail.h>
 #include <gr_buffer.h>
+#include <boost/thread.hpp>
 #include <iostream>
 #include <limits>
 #include <assert.h>
@@ -44,14 +45,6 @@
 
 static int which_scheduler  = 0;
 
-
-std::ostream&
-operator << (std::ostream& os, const gr_block *m)
-{
-  os << "<gr_block " << m->name() << " (" << m->unique_id() << ")>";
-  return os;
-}
-
 gr_single_threaded_scheduler_sptr
 gr_make_single_threaded_scheduler (const std::vector<gr_block_sptr> &blocks)
 {
@@ -162,6 +155,9 @@
   nalive = d_blocks.size ();
   while (d_enabled && nalive > 0){
 
+    if (boost::this_thread::interruption_requested())
+      break;
+
     gr_block           *m = d_blocks[bi].get ();
     gr_block_detail    *d = m->detail().get ();
 

Modified: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_top_block.cc
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_top_block.cc
   2008-07-17 13:52:07 UTC (rev 8915)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_top_block.cc
   2008-07-17 14:26:51 UTC (rev 8916)
@@ -27,7 +27,6 @@
 #include <unistd.h>
 #include <gr_top_block.h>
 #include <gr_top_block_impl.h>
-#include <gr_top_block_impl_sts.h>
 #include <gr_io_signature.h>
 #include <iostream>
 
@@ -43,7 +42,7 @@
                   gr_make_io_signature(0,0,0))
   
 {
-  d_impl = new gr_top_block_impl_sts(this);
+  d_impl = new gr_top_block_impl(this);
 }
   
 gr_top_block::~gr_top_block()

Modified: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_top_block_impl.cc
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_top_block_impl.cc
      2008-07-17 13:52:07 UTC (rev 8915)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_top_block_impl.cc
      2008-07-17 14:26:51 UTC (rev 8916)
@@ -27,21 +27,58 @@
 #include <gr_top_block.h>
 #include <gr_top_block_impl.h>
 #include <gr_flat_flowgraph.h>
-#include <gr_scheduler_thread.h>
-#include <gr_local_sighandler.h>
+#include <gr_scheduler_sts.h>
+#include <gr_scheduler_tpb.h>
 
 #include <stdexcept>
 #include <iostream>
 #include <string.h>
 #include <unistd.h>
+#include <stdlib.h>
 
 #define GR_TOP_BLOCK_IMPL_DEBUG 0
 
+
+typedef gr_scheduler_sptr (*scheduler_maker)(gr_flat_flowgraph_sptr ffg);
+
+static struct scheduler_table {
+  const char          *name;
+  scheduler_maker      f;
+} scheduler_table[] = {
+  { "TPB",     gr_scheduler_tpb::make },       // first entry is default
+  { "STS",     gr_scheduler_sts::make }
+};
+
+static gr_scheduler_sptr
+make_scheduler(gr_flat_flowgraph_sptr ffg)
+{
+  static scheduler_maker  factory = 0;
+
+  if (factory == 0){
+    char *v = getenv("GR_SCHEDULER");
+    if (!v)
+      factory = scheduler_table[0].f;  // use default
+    else {
+      for (size_t i = 0; i < 
sizeof(scheduler_table)/sizeof(scheduler_table[0]); i++){
+       if (strcmp(v, scheduler_table[i].name) == 0){
+         factory = scheduler_table[i].f;
+         break;
+       }
+      }
+      if (factory == 0){
+       std::cerr << "warning: Invalid GR_SCHEDULER environment variable value 
\""
+                 << v << "\".  Using \"" << scheduler_table[0].name << "\"\n";
+       factory = scheduler_table[0].f;
+      }
+    }
+  }
+  return factory(ffg);
+}
+
+
 gr_top_block_impl::gr_top_block_impl(gr_top_block *owner) 
-  : d_owner(owner),
-    d_running(false),
-    d_ffg(),
-    d_lock_count(0)
+  : d_owner(owner), d_ffg(),
+    d_state(IDLE), d_lock_count(0)
 {
 }
 
@@ -53,14 +90,13 @@
 void
 gr_top_block_impl::start()
 {
-  if (GR_TOP_BLOCK_IMPL_DEBUG)
-    std::cout << "start: entered " << this << std::endl;
+  gr_lock_guard        l(d_mutex);
 
-  if (d_running)
+  if (d_state != IDLE)
     throw std::runtime_error("top_block::start: top block already running or 
wait() not called after previous stop()");
 
   if (d_lock_count > 0)
-    throw std::runtime_error("top_block::start: can't call start with flow 
graph locked");
+    throw std::runtime_error("top_block::start: can't start with flow graph 
locked");
 
   // Create new flat flow graph by flattening hierarchy
   d_ffg = d_owner->flatten();
@@ -69,77 +105,71 @@
   d_ffg->validate();
   d_ffg->setup_connections();
 
-  // Execute scheduler threads
-  start_threads();
-  d_running = true;
+  d_scheduler = make_scheduler(d_ffg);
+  d_state = RUNNING;
 }
 
+void 
+gr_top_block_impl::stop()
+{
+  if (d_scheduler)
+    d_scheduler->stop();
+}
 
+
+void
+gr_top_block_impl::wait()
+{
+  if (d_scheduler)
+    d_scheduler->wait();
+
+  d_state = IDLE;
+}
+
 // N.B. lock() and unlock() cannot be called from a flow graph thread or
 // deadlock will occur when reconfiguration happens
 void
 gr_top_block_impl::lock()
 {
-  omni_mutex_lock lock(d_reconf);
+  gr_lock_guard lock(d_mutex);
   d_lock_count++;
-  if (GR_TOP_BLOCK_IMPL_DEBUG)
-    std::cout << "runtime: locked, count = " << d_lock_count <<  std::endl;
 }
 
 void
 gr_top_block_impl::unlock()
 {
-  omni_mutex_lock lock(d_reconf);
+  gr_lock_guard lock(d_mutex);
+
   if (d_lock_count <= 0){
     d_lock_count = 0;          // fix it, then complain
     throw std::runtime_error("unpaired unlock() call");
   }
 
   d_lock_count--;
-  if (GR_TOP_BLOCK_IMPL_DEBUG)
-    std::cout << "unlock: unlocked, count = " << d_lock_count << std::endl;
+  if (d_lock_count > 0 || d_state == IDLE) // nothing to do
+    return;
 
-  if (d_lock_count == 0) {
-    if (GR_TOP_BLOCK_IMPL_DEBUG)
-      std::cout << "unlock: restarting flowgraph" << std::endl;
-    restart();
-  }
+  restart();
 }
 
+/*
+ * restart is called with d_mutex held
+ */
 void
 gr_top_block_impl::restart()
 {
-  if (GR_TOP_BLOCK_IMPL_DEBUG)
-    std::cout << "restart: entered" << std::endl;
-
-  if (!d_running)
-    return;            // nothing to do
-
-  // Stop scheduler threads and wait for completion
-  stop();
+  stop();                   // Stop scheduler and wait for completion
   wait();
-  if (GR_TOP_BLOCK_IMPL_DEBUG)
-    std::cout << "restart: threads stopped" << std::endl;
 
   // Create new simple flow graph
   gr_flat_flowgraph_sptr new_ffg = d_owner->flatten();        
   new_ffg->validate();                // check consistency, sanity, etc
-
-  if (GR_TOP_BLOCK_IMPL_DEBUG) {
-      std::cout << std::endl << "*** Existing flat flowgraph @" << d_ffg << 
":" << std::endl;
-      d_ffg->dump();
-  }
   new_ffg->merge_connections(d_ffg);   // reuse buffers, etc
-
-  if (GR_TOP_BLOCK_IMPL_DEBUG) {
-    std::cout << std::endl << "*** New flat flowgraph after merge @" << 
new_ffg << ":" << std::endl;
-    new_ffg->dump();
-  }
-  
   d_ffg = new_ffg;
 
-  start_threads();
-  d_running = true;
+  // Create a new scheduler to execute it
+  d_scheduler = make_scheduler(d_ffg);
+  d_state = RUNNING;
 }
 
 void
@@ -148,14 +178,3 @@
   if (d_ffg)
     d_ffg->dump();
 }
-
-gr_block_vector_t
-gr_top_block_impl::make_gr_block_vector(gr_basic_block_vector_t blocks)
-{
-  gr_block_vector_t result;
-  for (gr_basic_block_viter_t p = blocks.begin(); p != blocks.end(); p++) {
-    result.push_back(make_gr_block_sptr(*p));
-  }
-
-  return result;
-}

Modified: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_top_block_impl.h
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_top_block_impl.h
       2008-07-17 13:52:07 UTC (rev 8915)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_top_block_impl.h
       2008-07-17 14:26:51 UTC (rev 8916)
@@ -23,8 +23,12 @@
 #ifndef INCLUDED_GR_TOP_BLOCK_IMPL_H
 #define INCLUDED_GR_TOP_BLOCK_IMPL_H
 
-#include <gr_scheduler_thread.h>
+#include <gr_scheduler.h>
+#include <boost/thread.hpp>
 
+typedef boost::mutex                   gr_mutex;       // FIXME move these 
elsewhere
+typedef boost::lock_guard<boost::mutex>        gr_lock_guard;
+
 /*!
  *\brief Abstract implementation details of gr_top_block
  * \ingroup internal
@@ -37,16 +41,16 @@
 {
 public:
   gr_top_block_impl(gr_top_block *owner);
-  virtual ~gr_top_block_impl();
+  ~gr_top_block_impl();
 
   // Create and start scheduler threads
-  virtual void start();
+  void start();
 
   // Signal scheduler threads to stop
-  virtual void stop() = 0;
+  void stop();
 
   // Wait for scheduler threads to exit
-  virtual void wait() = 0;
+  void wait();
 
   // Lock the top block to allow reconfiguration
   void lock();
@@ -59,22 +63,16 @@
   
 protected:
     
+  enum tb_state { IDLE, RUNNING };
+
   gr_top_block                  *d_owner;
-  bool                           d_running;
   gr_flat_flowgraph_sptr         d_ffg;
+  gr_scheduler_sptr             d_scheduler;
 
-  omni_mutex                     d_reconf;     // protects d_lock_count
+  gr_mutex                       d_mutex;      // protects d_state and 
d_lock_count
+  tb_state                      d_state;
   int                            d_lock_count;
-
-  virtual void start_threads() = 0;
-
-/*!
- * Make a vector of gr_block from a vector of gr_basic_block
- *
- * Pass-by-value to avoid problem with possible asynchronous modification
- */
-  static gr_block_vector_t make_gr_block_vector(gr_basic_block_vector_t 
blocks);
-
+  
 private:
   void restart();
 };

Deleted: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_top_block_impl_sts.cc

Deleted: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_top_block_impl_sts.h

Copied: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_tpb_detail.cc
 (from rev 8915, 
gnuradio/branches/developers/eb/sched-wip/gnuradio-core/src/lib/runtime/gr_tpb_detail.cc)
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_tpb_detail.cc
                          (rev 0)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_tpb_detail.cc
  2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,67 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <gr_tpb_detail.h>
+#include <gr_block.h>
+#include <gr_block_detail.h>
+#include <gr_buffer.h>
+
+/*
+ * We assume that no worker threads are ever running when the
+ * graph structure is being manipulated, thus it's safe for us to poke
+ * around in our neighbors w/o holding any locks.
+ */
+
+void
+gr_tpb_detail::notify_upstream(gr_block_detail *d)
+{
+  // For each of our inputs, tell the guy upstream that we've consumed
+  // some input, and that he most likely has more output buffer space
+  // available.
+
+  for (size_t i = 0; i < d->d_input.size(); i++){
+    // Can you say, "pointer chasing?"
+    d->d_input[i]->buffer()->link()->detail()->d_tpb.set_output_changed();
+  }
+}
+
+void
+gr_tpb_detail::notify_downstream(gr_block_detail *d)
+{
+  // For each of our outputs, tell the guys downstream that they have
+  // new input available.
+
+  for (size_t i = 0; i < d->d_output.size(); i++){
+    gr_buffer_sptr buf = d->d_output[i];
+    for (size_t j = 0, k = buf->nreaders(); j < k; j++)
+      buf->reader(j)->link()->detail()->d_tpb.set_input_changed();
+  }
+}
+
+void
+gr_tpb_detail::notify_neighbors(gr_block_detail *d)
+{
+  notify_downstream(d);
+  notify_upstream(d);
+}

Copied: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_tpb_detail.h
 (from rev 8915, 
gnuradio/branches/developers/eb/sched-wip/gnuradio-core/src/lib/runtime/gr_tpb_detail.h)
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_tpb_detail.h
                           (rev 0)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_tpb_detail.h
   2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,81 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_GR_TPB_DETAIL_H
+#define INCLUDED_GR_TPB_DETAIL_H
+
+#include <boost/thread.hpp>
+
+class gr_block_detail;
+
+/*!
+ * \brief used by thread-per-block scheduler
+ */
+struct gr_tpb_detail {
+  typedef boost::unique_lock<boost::mutex>  scoped_lock;
+
+  boost::mutex                 mutex;                  //< protects all vars
+  bool                         input_changed;
+  boost::condition_variable    input_cond;
+  bool                         output_changed;
+  boost::condition_variable    output_cond;
+
+  gr_tpb_detail()
+    : input_changed(false), output_changed(false) {}
+
+
+  //! Called by us to tell all our upstream blocks that their output may have 
changed.
+  void notify_upstream(gr_block_detail *d);
+
+  //! Called by us to tell all our downstream blocks that their input may have 
changed.
+  void notify_downstream(gr_block_detail *d);
+
+  //! Called by us to notify both upstream and downstream
+  void notify_neighbors(gr_block_detail *d);
+
+  //! Called by us
+  void clear_changed()
+  {
+    scoped_lock        guard(mutex);
+    input_changed = false;
+    output_changed = false;
+  }
+
+private:
+
+  //! Used by notify_downstream
+  void set_input_changed()
+  {
+    scoped_lock        guard(mutex);
+    input_changed = true;
+    input_cond.notify_one();
+  }
+
+  //! Used by notify_upstream
+  void set_output_changed()
+  {
+    scoped_lock        guard(mutex);
+    output_changed = true;
+    output_cond.notify_one();
+  }
+
+};
+
+#endif /* INCLUDED_GR_TPB_DETAIL_H */

Copied: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_tpb_thread_body.cc
 (from rev 8915, 
gnuradio/branches/developers/eb/sched-wip/gnuradio-core/src/lib/runtime/gr_tpb_thread_body.cc)
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_tpb_thread_body.cc
                             (rev 0)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_tpb_thread_body.cc
     2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,76 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <gr_tpb_thread_body.h>
+#include <iostream>
+
+gr_tpb_thread_body::gr_tpb_thread_body(gr_block_sptr block)
+  : d_exec(block)
+{
+  // std::cerr << "gr_tpb_thread_body: " << block << std::endl;
+
+  gr_block_detail      *d = block->detail().get();
+  gr_block_executor::state s;
+
+  while (1){
+    d->d_tpb.clear_changed();
+    s = d_exec.run_one_iteration();
+
+    switch(s){
+    case gr_block_executor::READY:             // Tell neighbors we made 
progress.
+      d->d_tpb.notify_neighbors(d);
+      break;
+
+    case gr_block_executor::READY_NO_OUTPUT:   // Notify upstream only
+      d->d_tpb.notify_upstream(d);
+      break;
+
+    case gr_block_executor::DONE:              // Game over.
+      d->d_tpb.notify_neighbors(d);
+      return;
+
+    case gr_block_executor::BLKD_IN:           // Wait for input.
+      {
+       gr_tpb_detail::scoped_lock guard(d->d_tpb.mutex);
+       while(!d->d_tpb.input_changed)
+         d->d_tpb.input_cond.wait(guard);
+      }
+      break;
+      
+    case gr_block_executor::BLKD_OUT:          // Wait for output buffer space.
+      {
+       gr_tpb_detail::scoped_lock guard(d->d_tpb.mutex);
+       while(!d->d_tpb.output_changed)
+         d->d_tpb.output_cond.wait(guard);
+      }
+      break;
+
+    default:
+      assert(0);
+    }
+  }
+}
+
+gr_tpb_thread_body::~gr_tpb_thread_body()
+{
+}

Copied: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_tpb_thread_body.h
 (from rev 8915, 
gnuradio/branches/developers/eb/sched-wip/gnuradio-core/src/lib/runtime/gr_tpb_thread_body.h)
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_tpb_thread_body.h
                              (rev 0)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/gr_tpb_thread_body.h
      2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,45 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_GR_TPB_THREAD_BODY_H
+#define INCLUDED_GR_TPB_THREAD_BODY_H
+
+#include <gr_block_executor.h>
+#include <gr_block.h>
+#include <gr_block_detail.h>
+
+/*!
+ * \brief The body of each thread-per-block thread.
+ *
+ * One of these is instantiated in its own thread for each block.  The
+ * constructor turns into the main loop which returns when the block is
+ * done or is interrupted.
+ */
+
+class gr_tpb_thread_body {
+  gr_block_executor    d_exec;
+
+public:
+  gr_tpb_thread_body(gr_block_sptr block);
+  ~gr_tpb_thread_body();
+};
+
+
+#endif /* INCLUDED_GR_TPB_THREAD_BODY_H */

Modified: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/qa_gr_buffer.cc
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/qa_gr_buffer.cc
   2008-07-17 13:52:07 UTC (rev 8915)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-core/src/lib/runtime/qa_gr_buffer.cc
   2008-07-17 14:26:51 UTC (rev 8916)
@@ -52,7 +52,7 @@
   int  nitems = 4000 / sizeof (int);
   int  counter = 0;
 
-  gr_buffer_sptr buf (gr_make_buffer (nitems, sizeof (int)));
+  gr_buffer_sptr buf(gr_make_buffer(nitems, sizeof (int), gr_block_sptr()));
 
   int last_sa;
   int sa;
@@ -87,8 +87,8 @@
   int  write_counter = 0;
   int  read_counter = 0;
 
-  gr_buffer_sptr buf (gr_make_buffer (nitems, sizeof (int)));
-  gr_buffer_reader_sptr r1 (gr_buffer_add_reader (buf, 0));
+  gr_buffer_sptr buf(gr_make_buffer(nitems, sizeof (int), gr_block_sptr()));
+  gr_buffer_reader_sptr r1 (gr_buffer_add_reader (buf, 0, gr_block_sptr()));
   
 
   int sa;
@@ -162,8 +162,8 @@
   
   int  nitems = (64 * (1L << 10)) / sizeof (int);      // 64K worth of ints
 
-  gr_buffer_sptr buf (gr_make_buffer (nitems, sizeof (int)));
-  gr_buffer_reader_sptr r1 (gr_buffer_add_reader (buf, 0));
+  gr_buffer_sptr buf(gr_make_buffer (nitems, sizeof (int), gr_block_sptr()));
+  gr_buffer_reader_sptr r1 (gr_buffer_add_reader (buf, 0, gr_block_sptr()));
 
   int  read_counter = 0;
   int  write_counter = 0;
@@ -229,7 +229,7 @@
   int  nitems = (64 * (1L << 10)) / sizeof (int);
 
   static const int N = 5;
-  gr_buffer_sptr buf (gr_make_buffer (nitems, sizeof (int)));
+  gr_buffer_sptr buf(gr_make_buffer(nitems, sizeof (int), gr_block_sptr()));
   gr_buffer_reader_sptr        reader[N];
   int                  read_counter[N];
   int                  write_counter = 0;
@@ -237,7 +237,7 @@
 
   for (int i = 0; i < N; i++){
     read_counter[i] = 0;
-    reader[i] = gr_buffer_add_reader (buf, 0);
+    reader[i] = gr_buffer_add_reader (buf, 0, gr_block_sptr());
   }
 
   for (int lc = 0; lc < 1000; lc++){

Modified: 
gnuradio/branches/features/mp-sched/gnuradio-core/src/tests/Makefile.am
===================================================================
--- gnuradio/branches/features/mp-sched/gnuradio-core/src/tests/Makefile.am     
2008-07-17 13:52:07 UTC (rev 8915)
+++ gnuradio/branches/features/mp-sched/gnuradio-core/src/tests/Makefile.am     
2008-07-17 14:26:51 UTC (rev 8916)
@@ -47,11 +47,13 @@
        benchmark_vco           \
        test_runtime            \
        test_general            \
-       test_all                \
        test_filter             \
        test_vmcircbuf
 
+bin_PROGRAMS = \
+       test_all
 
+
 noinst_SCRIPTS = \
        benchmark_dotprod
 

Copied: 
gnuradio/branches/features/mp-sched/gnuradio-examples/python/mp-sched/synthetic.py
 (from rev 8915, 
gnuradio/branches/developers/eb/sched-wip/gnuradio-examples/python/mp-sched/synthetic.py)
===================================================================
--- 
gnuradio/branches/features/mp-sched/gnuradio-examples/python/mp-sched/synthetic.py
                          (rev 0)
+++ 
gnuradio/branches/features/mp-sched/gnuradio-examples/python/mp-sched/synthetic.py
  2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,118 @@
+#!/usr/bin/env python
+#
+# Copyright 2008 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+from gnuradio import gr, gru, eng_notation, blks2
+from gnuradio.eng_option import eng_option
+from optparse import OptionParser
+import os
+
+
+class pipeline(gr.hier_block2):
+    def __init__(self, nstages, ntaps=256):
+        """
+        Create a pipeline of nstages of gr.fir_filter_fff's connected in serial
+        terminating in a gr.null_sink.
+        """
+        gr.hier_block2.__init__(self, "pipeline",
+                                gr.io_signature(1, 1, gr.sizeof_float),
+                                gr.io_signature(0, 0, 0))
+        taps = ntaps*[1.0/ntaps]
+        upstream = self
+        for i in range(nstages):
+            op = gr.fir_filter_fff(1, taps)
+            self.connect(upstream, op)
+            upstream = op
+
+        self.connect(upstream, gr.null_sink(gr.sizeof_float))
+        
+
+class top(gr.top_block):
+    def __init__(self):
+        gr.top_block.__init__(self)
+
+        default_nsamples = 10e6
+        parser=OptionParser(option_class=eng_option)
+        parser.add_option("-p", "--npipelines", type="intx", default=1,
+                          metavar="NPIPES", help="the number of pipelines to 
create (default=%default)")
+        parser.add_option("-s", "--nstages", type="intx", default=1,
+                          metavar="NSTAGES", help="the number of stages in 
each pipeline (default=%default)")
+        parser.add_option("-N", "--nsamples", type="eng_float", 
default=default_nsamples,
+                          help=("the number of samples to run through the 
graph (default=%s)" %
+                                (eng_notation.num_to_str(default_nsamples))))
+        parser.add_option("-m", "--machine-readable", action="store_true", 
default=False,
+                          help="enable machine readable output")
+
+        (options, args) = parser.parse_args()
+        if len(args) != 0:
+            parser.print_help()
+            raise SystemExit, 1
+
+        self.npipes = options.npipelines
+        self.nstages = options.nstages
+        self.nsamples = options.nsamples
+        self.machine_readable = options.machine_readable
+
+        ntaps = 256
+
+        # Something vaguely like floating point ops
+        self.flop = 2 * ntaps * options.npipelines * options.nstages * 
options.nsamples
+
+        src = gr.null_source(gr.sizeof_float)
+        head = gr.head(gr.sizeof_float, int(options.nsamples))
+        self.connect(src, head)
+
+        for n in range(options.npipelines):
+            self.connect(head, pipeline(options.nstages, ntaps))
+
+
+def time_it(tb):
+    start = os.times()
+    tb.run()
+    stop = os.times()
+    delta = map((lambda a, b: a-b), stop, start)
+    user, sys, childrens_user, childrens_sys, real = delta
+    total_user = user + childrens_user
+    total_sys  = sys + childrens_sys
+    if tb.machine_readable:
+        print "%3d %3d %.3e %7.3f %7.3f %7.3f %7.3f %.6e %.3e" % (
+            tb.npipes, tb.nstages, tb.nsamples, real, total_user, total_sys, 
(total_user+total_sys)/real, tb.flop, tb.flop/real)
+    else:
+        print "npipes           %7d"   % (tb.npipes,)
+        print "nstages          %7d"   % (tb.nstages,)
+        print "nsamples         %s"    % 
(eng_notation.num_to_str(tb.nsamples),)
+        print "real             %7.3f" % (real,)
+        print "user             %7.3f" % (total_user,)
+        print "sys              %7.3f" % (total_sys,)
+        print "(user+sys)/real  %7.3f" % ((total_user + total_sys)/real,)
+        print "pseudo_flop      %s"    % (eng_notation.num_to_str(tb.flop),)
+        print "pseudo_flop/real %s"    % 
(eng_notation.num_to_str(tb.flop/real),)
+
+
+if __name__ == "__main__":
+    try:
+        tb = top()
+        time_it(tb)
+    except KeyboardInterrupt:
+        raise SystemExit, 128
+    
+    
+    
+

Modified: gnuradio/branches/features/mp-sched/gr-pager/src/Makefile.am
===================================================================
--- gnuradio/branches/features/mp-sched/gr-pager/src/Makefile.am        
2008-07-17 13:52:07 UTC (rev 8915)
+++ gnuradio/branches/features/mp-sched/gr-pager/src/Makefile.am        
2008-07-17 14:26:51 UTC (rev 8916)
@@ -71,8 +71,9 @@
 ourpython_PYTHON = \
     __init__.py \
     pager_swig.py \
+    pager_utils.py \
     flex_demod.py
-        
+
 ourlib_LTLIBRARIES = _pager_swig.la
 
 # These are the source files that go into the shared library

Modified: gnuradio/branches/features/mp-sched/gr-pager/src/__init__.py
===================================================================
--- gnuradio/branches/features/mp-sched/gr-pager/src/__init__.py        
2008-07-17 13:52:07 UTC (rev 8915)
+++ gnuradio/branches/features/mp-sched/gr-pager/src/__init__.py        
2008-07-17 14:26:51 UTC (rev 8916)
@@ -23,3 +23,4 @@
 
 from pager_swig import *
 from flex_demod import flex_demod
+from pager_utils import *

Copied: gnuradio/branches/features/mp-sched/gr-pager/src/pager_utils.py (from 
rev 8915, gnuradio/branches/developers/eb/sched-wip/gr-pager/src/pager_utils.py)
===================================================================
--- gnuradio/branches/features/mp-sched/gr-pager/src/pager_utils.py             
                (rev 0)
+++ gnuradio/branches/features/mp-sched/gr-pager/src/pager_utils.py     
2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,47 @@
+#
+# Copyright 2008 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+import gnuradio.gr.gr_threading as _threading
+
+def make_trans_table():
+    table = 256 * ['.']
+    for i in range(256):
+        if (i < 32):
+            table[i] = '.'
+        else:
+            table[i] = chr(i)
+    return ''.join(table)
+
+_trans_table = make_trans_table()
+
+def make_printable(s):
+    return s.translate(_trans_table)
+
+class top_block_runner(_threading.Thread):
+    def __init__(self, tb):
+        _threading.Thread.__init__(self)
+        self.setDaemon(1)
+        self.tb = tb
+        self.done = False
+        self.start()
+
+    def run(self):
+        self.tb.run()
+        self.done = True

Modified: gnuradio/branches/features/mp-sched/gr-pager/src/usrp_flex.py
===================================================================
--- gnuradio/branches/features/mp-sched/gr-pager/src/usrp_flex.py       
2008-07-17 13:52:07 UTC (rev 8915)
+++ gnuradio/branches/features/mp-sched/gr-pager/src/usrp_flex.py       
2008-07-17 14:26:51 UTC (rev 8916)
@@ -160,27 +160,24 @@
     # Flow graph emits pages into message queue
     queue = gr.msg_queue()
     tb = app_top_block(options, queue)
+    runner = pager.top_block_runner(tb)
     
     try:
-        tb.start()
        while 1:
            if not queue.empty_p():
                msg = queue.delete_head() # Blocking read
                page = join(split(msg.to_string(), chr(128)), '|')
-               disp = []
-               for n in range(len(page)):
-                   if ord(page[n]) < 32:
-                       disp.append('.')
-                   else:
-                       disp.append(page[n])
-               print join(disp, '')
+                s = pager.make_printable(page)
+                print s
                tb.adjust_freq()
-                                                                               
+            elif runner.done:
+                break
            else:
                time.sleep(1)
 
     except KeyboardInterrupt:
         tb.stop()
+        runner = None
 
 if __name__ == "__main__":
     main()

Modified: gnuradio/branches/features/mp-sched/gr-pager/src/usrp_flex_all.py
===================================================================
--- gnuradio/branches/features/mp-sched/gr-pager/src/usrp_flex_all.py   
2008-07-17 13:52:07 UTC (rev 8915)
+++ gnuradio/branches/features/mp-sched/gr-pager/src/usrp_flex_all.py   
2008-07-17 14:26:51 UTC (rev 8916)
@@ -77,25 +77,22 @@
     queue = gr.msg_queue()
     tb = app_top_block(options, queue)
 
+    runner = pager.top_block_runner(tb)
     try:
-        tb.start()
        while 1:
            if not queue.empty_p():
                msg = queue.delete_head() # Blocking read
                page = join(split(msg.to_string(), chr(128)), '|')
-               disp = []
-               for n in range(len(page)):
-                   if ord(page[n]) < 32:
-                       disp.append('.')
-                   else:
-                       disp.append(page[n])
-               print join(disp, '')
-                                               
+                s = pager.make_printable(page)
+                print s
+            elif runner.done:
+                break
            else:
-               time.sleep(1)
+               time.sleep(0.05)
 
     except KeyboardInterrupt:
         tb.stop()
+        runner = None
     
 if __name__ == "__main__":
     main()

Modified: gnuradio/branches/features/mp-sched/gr-pager/src/usrp_flex_band.py
===================================================================
--- gnuradio/branches/features/mp-sched/gr-pager/src/usrp_flex_band.py  
2008-07-17 13:52:07 UTC (rev 8915)
+++ gnuradio/branches/features/mp-sched/gr-pager/src/usrp_flex_band.py  
2008-07-17 14:26:51 UTC (rev 8916)
@@ -9,6 +9,7 @@
 class app_top_block(gr.top_block):
     def __init__(self, options, queue):
        gr.top_block.__init__(self, "usrp_flex_all")
+        self.subdev = None
 
         if options.from_file is not None:
             self.src = gr.file_source(gr.sizeof_gr_complex, options.from_file)
@@ -57,6 +58,7 @@
        # Avoid weak-ref error
        del self.subdev
        
+
 def main():
     parser = OptionParser(option_class=eng_option)
     parser.add_option("-f", "--frequency", type="eng_float", default=929.5e6,
@@ -81,25 +83,22 @@
     queue = gr.msg_queue()
     tb = app_top_block(options, queue)
 
+    runner = pager.top_block_runner(tb)
     try:
-        tb.start()
        while 1:
            if not queue.empty_p():
                msg = queue.delete_head() # Blocking read
                page = join(split(msg.to_string(), chr(128)), '|')
-               disp = []
-               for n in range(len(page)):
-                   if ord(page[n]) < 32:
-                       disp.append('.')
-                   else:
-                       disp.append(page[n])
-               print join(disp, '')
-                                               
+                s = pager.make_printable(page)
+                print s
+            elif runner.done:
+                break
            else:
-               time.sleep(1)
+               time.sleep(0.05)
 
     except KeyboardInterrupt:
         tb.stop()
+        runner = None
     
 if __name__ == "__main__":
     main()

Modified: 
gnuradio/branches/features/mp-sched/gruel/src/include/gruel/Makefile.am
===================================================================
--- gnuradio/branches/features/mp-sched/gruel/src/include/gruel/Makefile.am     
2008-07-17 13:52:07 UTC (rev 8915)
+++ gnuradio/branches/features/mp-sched/gruel/src/include/gruel/Makefile.am     
2008-07-17 14:26:51 UTC (rev 8916)
@@ -28,4 +28,5 @@
 
 gruelinclude_HEADERS = \
        $(BUILT_SOURCES) \
-       realtime.h
+       realtime.h \
+       thread_group.h

Copied: 
gnuradio/branches/features/mp-sched/gruel/src/include/gruel/thread_body_wrapper.h
 (from rev 8915, 
gnuradio/branches/developers/eb/sched-wip/gruel/src/include/gruel/thread_body_wrapper.h)
===================================================================
--- 
gnuradio/branches/features/mp-sched/gruel/src/include/gruel/thread_body_wrapper.h
                           (rev 0)
+++ 
gnuradio/branches/features/mp-sched/gruel/src/include/gruel/thread_body_wrapper.h
   2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,68 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_THREAD_BODY_WRAPPER_H
+#define INCLUDED_THREAD_BODY_WRAPPER_H
+
+#include <boost/thread.hpp>
+#include <exception>
+#include <iostream>
+
+namespace gruel 
+{
+
+  void mask_signals();
+
+  template <class F>
+  class thread_body_wrapper
+  {
+    F          d_f;
+    std::string d_name;
+
+  public:
+
+    explicit thread_body_wrapper(F f, const std::string &name="")
+      : d_f(f), d_name(name) {}
+
+    void operator()()
+    {
+      mask_signals();
+
+      try {
+       d_f();
+      }
+      catch(boost::thread_interrupted const &)
+      {
+      }
+      catch(std::exception const &e)
+      {
+       std::cerr << "thread[" << d_name << "]: "
+                 << e.what() << std::endl;
+      }
+      catch(...)
+      {
+       std::cerr << "thread[" << d_name << "]: "
+                 << "caught unrecognized exception\n";
+      }
+    }
+  };
+}
+
+#endif /* INCLUDED_THREAD_BODY_WRAPPER_H */

Copied: 
gnuradio/branches/features/mp-sched/gruel/src/include/gruel/thread_group.h 
(from rev 8915, 
gnuradio/branches/developers/eb/sched-wip/gruel/src/include/gruel/thread_group.h)
===================================================================
--- gnuradio/branches/features/mp-sched/gruel/src/include/gruel/thread_group.h  
                        (rev 0)
+++ gnuradio/branches/features/mp-sched/gruel/src/include/gruel/thread_group.h  
2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,44 @@
+/* -*- c++ -*- */
+/*
+ * Copyright (C) 2001-2003 William E. Kempf
+ * Copyright (C) 2007 Anthony Williams
+ * Copyright 2008 Free Software Foundation, Inc.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See 
accompanying 
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+/*
+ * This was extracted from Boost 1.35.0 and fixed.
+ */
+
+#ifndef INCLUDED_GRUEL_THREAD_GROUP_H
+#define INCLUDED_GRUEL_THREAD_GROUP_H
+
+#include <boost/utility.hpp>
+#include <boost/thread.hpp>
+#include <boost/thread/shared_mutex.hpp>
+#include <boost/function.hpp>
+
+namespace gruel
+{
+  class thread_group : public boost::noncopyable
+  {
+  public:
+    thread_group();
+    ~thread_group();
+
+    boost::thread* create_thread(const boost::function0<void>& threadfunc);
+    void add_thread(boost::thread* thrd);
+    void remove_thread(boost::thread* thrd);
+    void join_all();
+    void interrupt_all();
+    size_t size() const;
+
+  private:
+    std::list<boost::thread*> m_threads;
+    mutable boost::shared_mutex m_mutex;
+  };
+}
+
+#endif /* INCLUDED_GRUEL_THREAD_GROUP_H */

Modified: gnuradio/branches/features/mp-sched/gruel/src/lib/Makefile.am
===================================================================
--- gnuradio/branches/features/mp-sched/gruel/src/lib/Makefile.am       
2008-07-17 13:52:07 UTC (rev 8915)
+++ gnuradio/branches/features/mp-sched/gruel/src/lib/Makefile.am       
2008-07-17 14:26:51 UTC (rev 8916)
@@ -21,19 +21,21 @@
 
 include $(top_srcdir)/Makefile.common
 
-AM_CPPFLAGS = $(DEFINES) $(BOOST_CFLAGS) $(GRUEL_INCLUDES) $(WITH_INCLUDES)
+AM_CPPFLAGS = $(DEFINES) $(BOOST_CPPFLAGS) $(GRUEL_INCLUDES) $(WITH_INCLUDES)
 
 lib_LTLIBRARIES = libgruel.la
 
+# magic flags
+libgruel_la_LDFLAGS = $(NO_UNDEFINED) $(BOOST_LDFLAGS) -version-info 0:0:0
+
 # These are the source files that go into the gruel shared library
 libgruel_la_SOURCES = \
-       realtime.cc
+       realtime.cc \
+       thread_body_wrapper.cc \
+       thread_group.cc
 
-# magic flags
-libgruel_la_LDFLAGS = $(NO_UNDEFINED)
-
-# link the library against the c++ standard library
 libgruel_la_LIBADD = \
+       $(BOOST_THREAD_LIB)
        -lstdc++                        
 
 noinst_HEADERS =

Copied: 
gnuradio/branches/features/mp-sched/gruel/src/lib/thread_body_wrapper.cc (from 
rev 8915, 
gnuradio/branches/developers/eb/sched-wip/gruel/src/lib/thread_body_wrapper.cc)
===================================================================
--- gnuradio/branches/features/mp-sched/gruel/src/lib/thread_body_wrapper.cc    
                        (rev 0)
+++ gnuradio/branches/features/mp-sched/gruel/src/lib/thread_body_wrapper.cc    
2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,85 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <gruel/thread_body_wrapper.h>
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+#include <stdio.h>
+
+namespace gruel {
+
+#if defined(HAVE_PTHREAD_SIGMASK) && defined(HAVE_SIGNAL_H)
+
+  void mask_signals()
+  {
+    sigset_t   new_set;
+    int r;
+
+    sigemptyset(&new_set);             
+    sigaddset(&new_set, SIGHUP);       // block these...
+    sigaddset(&new_set, SIGINT);
+    sigaddset(&new_set, SIGPIPE);
+    sigaddset(&new_set, SIGALRM);
+    sigaddset(&new_set, SIGTERM);
+    sigaddset(&new_set, SIGUSR1);
+    sigaddset(&new_set, SIGCHLD);
+#ifdef SIGPOLL
+    sigaddset(&new_set, SIGPOLL);
+#endif
+#ifdef SIGPROF
+    sigaddset(&new_set, SIGPROF);
+#endif
+#ifdef SIGSYS
+    sigaddset(&new_set, SIGSYS);
+#endif
+#ifdef SIGTRAP
+    sigaddset(&new_set, SIGTRAP);
+#endif
+#ifdef SIGURG
+    sigaddset(&new_set, SIGURG);
+#endif
+#ifdef SIGVTALRM
+    sigaddset(&new_set, SIGVTALRM);
+#endif
+#ifdef SIGXCPU
+    sigaddset(&new_set, SIGXCPU);
+#endif
+#ifdef SIGXFSZ
+    sigaddset(&new_set, SIGXFSZ);
+#endif
+    r = pthread_sigmask(SIG_BLOCK, &new_set, 0);
+    if (r != 0)
+      perror("pthread_sigmask");
+  }
+
+#else
+
+  void mask_signals()
+  {
+  }
+
+#endif
+
+};

Copied: gnuradio/branches/features/mp-sched/gruel/src/lib/thread_group.cc (from 
rev 8915, 
gnuradio/branches/developers/eb/sched-wip/gruel/src/lib/thread_group.cc)
===================================================================
--- gnuradio/branches/features/mp-sched/gruel/src/lib/thread_group.cc           
                (rev 0)
+++ gnuradio/branches/features/mp-sched/gruel/src/lib/thread_group.cc   
2008-07-17 14:26:51 UTC (rev 8916)
@@ -0,0 +1,99 @@
+/* -*- c++ -*- */
+/*
+ * Copyright (C) 2001-2003 William E. Kempf
+ * Copyright (C) 2007 Anthony Williams
+ * Copyright 2008 Free Software Foundation, Inc.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See 
accompanying 
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+/*
+ * This was extracted from Boost 1.35.0 and fixed.
+ */
+
+#include <gruel/thread_group.h>
+
+namespace gruel
+{
+  thread_group::thread_group()
+  {
+  }
+
+  thread_group::~thread_group()
+  {
+    // We shouldn't have to scoped_lock here, since referencing this object
+    // from another thread while we're deleting it in the current thread is
+    // going to lead to undefined behavior any way.
+    for (std::list<boost::thread*>::iterator it = m_threads.begin();
+        it != m_threads.end(); ++it)
+      {
+       delete (*it);
+      }
+  }
+
+  boost::thread* thread_group::create_thread(const boost::function0<void>& 
threadfunc)
+  {
+    // No scoped_lock required here since the only "shared data" that's
+    // modified here occurs inside add_thread which does scoped_lock.
+    std::auto_ptr<boost::thread> thrd(new boost::thread(threadfunc));
+    add_thread(thrd.get());
+    return thrd.release();
+  }
+
+  void thread_group::add_thread(boost::thread* thrd)
+  {
+    boost::lock_guard<boost::shared_mutex> guard(m_mutex);
+
+    // For now we'll simply ignore requests to add a thread object multiple
+    // times. Should we consider this an error and either throw or return an
+    // error value?
+    std::list<boost::thread*>::iterator it = std::find(m_threads.begin(),
+                                                      m_threads.end(), thrd);
+    BOOST_ASSERT(it == m_threads.end());
+    if (it == m_threads.end())
+      m_threads.push_back(thrd);
+  }
+
+  void thread_group::remove_thread(boost::thread* thrd)
+  {
+    boost::lock_guard<boost::shared_mutex> guard(m_mutex);
+
+    // For now we'll simply ignore requests to remove a thread object that's
+    // not in the group. Should we consider this an error and either throw or
+    // return an error value?
+    std::list<boost::thread*>::iterator it = std::find(m_threads.begin(),
+                                                      m_threads.end(), thrd);
+    BOOST_ASSERT(it != m_threads.end());
+    if (it != m_threads.end())
+      m_threads.erase(it);
+  }
+
+  void thread_group::join_all()
+  {
+    boost::shared_lock<boost::shared_mutex> guard(m_mutex);
+    for (std::list<boost::thread*>::iterator it = m_threads.begin();
+        it != m_threads.end(); ++it)
+      {
+       (*it)->join();
+      }
+  }
+
+  void thread_group::interrupt_all()
+  {
+    boost::shared_lock<boost::shared_mutex> guard(m_mutex);
+    for(std::list<boost::thread*>::iterator 
it=m_threads.begin(),end=m_threads.end();
+       it!=end;
+       ++it)
+      {
+       (*it)->interrupt();
+      }
+  }
+
+  size_t thread_group::size() const
+  {
+    boost::shared_lock<boost::shared_mutex> guard(m_mutex);
+    return m_threads.size();
+  }
+
+} // namespace gruel

Modified: gnuradio/branches/features/mp-sched/mblock/src/lib/Makefile.am
===================================================================
--- gnuradio/branches/features/mp-sched/mblock/src/lib/Makefile.am      
2008-07-17 13:52:07 UTC (rev 8915)
+++ gnuradio/branches/features/mp-sched/mblock/src/lib/Makefile.am      
2008-07-17 14:26:51 UTC (rev 8916)
@@ -22,7 +22,7 @@
 include $(top_srcdir)/Makefile.common
 
 AM_CPPFLAGS = $(DEFINES) $(OMNITHREAD_INCLUDES) $(PMT_INCLUDES) \
-       $(BOOST_CFLAGS) $(CPPUNIT_INCLUDES) $(WITH_INCLUDES)
+       $(BOOST_CPPFLAGS) $(CPPUNIT_INCLUDES) $(WITH_INCLUDES)
 
 # disable test until we fix ticket:180
 # TESTS = test_mblock

Modified: gnuradio/branches/features/mp-sched/pmt/src/lib/Makefile.am
===================================================================
--- gnuradio/branches/features/mp-sched/pmt/src/lib/Makefile.am 2008-07-17 
13:52:07 UTC (rev 8915)
+++ gnuradio/branches/features/mp-sched/pmt/src/lib/Makefile.am 2008-07-17 
14:26:51 UTC (rev 8916)
@@ -21,7 +21,7 @@
 
 include $(top_srcdir)/Makefile.common
 
-AM_CPPFLAGS = $(DEFINES) $(OMNITHREAD_INCLUDES) $(BOOST_CFLAGS) \
+AM_CPPFLAGS = $(DEFINES) $(OMNITHREAD_INCLUDES) $(BOOST_CPPFLAGS) \
        $(CPPUNIT_INCLUDES) $(WITH_INCLUDES)
 
 TESTS = test_pmt

Modified: gnuradio/branches/features/mp-sched/run_tests.sh.in
===================================================================
--- gnuradio/branches/features/mp-sched/run_tests.sh.in 2008-07-17 13:52:07 UTC 
(rev 8915)
+++ gnuradio/branches/features/mp-sched/run_tests.sh.in 2008-07-17 14:26:51 UTC 
(rev 8916)
@@ -138,8 +138,15 @@
 ok=yes
 for file in $3/qa_*.py
 do
-  if ! @PYTHON@ $file
+  # echo $file
+  @PYTHON@ $file
+  r=$?
+  if [ $r -ne 0 ]
   then
+    if [ $r -ge 128 ]          # killed by a signal
+    then
+      exit $r
+    fi
     ok=no
   fi  
 done

Modified: gnuradio/branches/features/mp-sched/usrp/host/apps/Makefile.am
===================================================================
--- gnuradio/branches/features/mp-sched/usrp/host/apps/Makefile.am      
2008-07-17 13:52:07 UTC (rev 8915)
+++ gnuradio/branches/features/mp-sched/usrp/host/apps/Makefile.am      
2008-07-17 14:26:51 UTC (rev 8916)
@@ -21,7 +21,7 @@
 
 include $(top_srcdir)/Makefile.common
 
-AM_CPPFLAGS = $(USRP_INCLUDES) $(BOOST_CFLAGS) $(CPPUNIT_INCLUDES) \
+AM_CPPFLAGS = $(USRP_INCLUDES) $(BOOST_CPPFLAGS) $(CPPUNIT_INCLUDES) \
           $(WITH_INCLUDES)
 
 bin_PROGRAMS =                         \

Modified: gnuradio/branches/features/mp-sched/usrp/host/apps-inband/Makefile.am
===================================================================
--- gnuradio/branches/features/mp-sched/usrp/host/apps-inband/Makefile.am       
2008-07-17 13:52:07 UTC (rev 8915)
+++ gnuradio/branches/features/mp-sched/usrp/host/apps-inband/Makefile.am       
2008-07-17 14:26:51 UTC (rev 8916)
@@ -23,7 +23,7 @@
 
 AM_CPPFLAGS =  \
        $(DEFINES) $(OMNITHREAD_INCLUDES) $(PMT_INCLUDES) $(MBLOCK_INCLUDES) \
-       $(USRP_INCLUDES) $(USRP_INBAND_INCLUDES) $(BOOST_CFLAGS) \
+       $(USRP_INCLUDES) $(USRP_INBAND_INCLUDES) $(BOOST_CPPFLAGS) \
        $(CPPUNIT_INCLUDES) $(WITH_INCLUDES)
 
 

Modified: gnuradio/branches/features/mp-sched/usrp/host/lib/inband/Makefile.am
===================================================================
--- gnuradio/branches/features/mp-sched/usrp/host/lib/inband/Makefile.am        
2008-07-17 13:52:07 UTC (rev 8915)
+++ gnuradio/branches/features/mp-sched/usrp/host/lib/inband/Makefile.am        
2008-07-17 14:26:51 UTC (rev 8916)
@@ -22,7 +22,7 @@
 
 AM_CPPFLAGS =  \
        $(DEFINES) $(OMNITHREAD_INCLUDES) $(PMT_INCLUDES) $(MBLOCK_INCLUDES) \
-       $(USRP_INCLUDES) $(BOOST_CFLAGS) $(CPPUNIT_INCLUDES) \
+       $(USRP_INCLUDES) $(BOOST_CPPFLAGS) $(CPPUNIT_INCLUDES) \
        -I$(srcdir)/../../apps-inband $(WITH_INCLUDES)
 
 TESTS = test_inband





reply via email to

[Prev in Thread] Current Thread [Next in Thread]