diff options
author | eb | 2009-03-19 20:58:41 +0000 |
---|---|---|
committer | eb | 2009-03-19 20:58:41 +0000 |
commit | 8cbe88292ba457fe1dca5931bf037d88a3650bc3 (patch) | |
tree | a9ac21af0b9f26556c5322888e1ae14d9aae7ed5 /gnuradio-core/src/lib | |
parent | 5407ac629e56300936cfbf0b5877aab607ddfef5 (diff) | |
download | gnuradio-8cbe88292ba457fe1dca5931bf037d88a3650bc3.tar.gz gnuradio-8cbe88292ba457fe1dca5931bf037d88a3650bc3.tar.bz2 gnuradio-8cbe88292ba457fe1dca5931bf037d88a3650bc3.zip |
Document run/start/stop/wait preconditions.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10654 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_hier_block2.h | 10 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_top_block.h | 22 |
2 files changed, 17 insertions, 15 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_hier_block2.h b/gnuradio-core/src/lib/runtime/gr_hier_block2.h index ece8b21ca..52b9bff96 100644 --- a/gnuradio-core/src/lib/runtime/gr_hier_block2.h +++ b/gnuradio-core/src/lib/runtime/gr_hier_block2.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006,2007,2008 Free Software Foundation, Inc. + * Copyright 2006,2007,2008,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -124,9 +124,9 @@ public: /*! * Lock a flowgraph in preparation for reconfiguration. When an equal * number of calls to lock() and unlock() have occurred, the flowgraph - * will be restarted automatically. + * will be reconfigured. * - * N.B. lock() and unlock() cannot be called from a flowgraph thread + * N.B. lock() and unlock() may not be called from a flowgraph thread * (E.g., gr_block::work method) or deadlock will occur when * reconfiguration happens. */ @@ -135,9 +135,9 @@ public: /*! * Unlock a flowgraph in preparation for reconfiguration. When an equal * number of calls to lock() and unlock() have occurred, the flowgraph - * will be restarted automatically. + * will be reconfigured. * - * N.B. lock() and unlock() cannot be called from a flowgraph thread + * N.B. lock() and unlock() may not be called from a flowgraph thread * (E.g., gr_block::work method) or deadlock will occur when * reconfiguration happens. */ diff --git a/gnuradio-core/src/lib/runtime/gr_top_block.h b/gnuradio-core/src/lib/runtime/gr_top_block.h index b47ec019c..bfe799c84 100644 --- a/gnuradio-core/src/lib/runtime/gr_top_block.h +++ b/gnuradio-core/src/lib/runtime/gr_top_block.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2007,2008 Free Software Foundation, Inc. + * Copyright 2007,2008,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -51,21 +51,22 @@ public: * \brief The simple interface to running a flowgraph. * * Calls start() then wait(). Used to run a flowgraph that will stop - * on its own, or to run a flowgraph indefinitely until SIGINT is - * received. + * on its own, or when another thread will call stop(). */ void run(); /*! * Start the contained flowgraph. Creates one or more threads to * execute the flow graph. Returns to the caller once the threads - * are created. + * are created. Calling start() on a top_block that is already + * started IS an error. */ void start(); /*! * Stop the running flowgraph. Notifies each thread created by the - * scheduler to shutdown, then returns to caller. + * scheduler to shutdown, then returns to caller. Calling stop() on + * a top_block that is already stopped IS NOT an error. */ void stop(); @@ -73,16 +74,17 @@ public: * Wait for a flowgraph to complete. Flowgraphs complete when * either (1) all blocks indicate that they are done (typically only * when using gr.file_source, or gr.head, or (2) after stop() has been - * called to request shutdown. + * called to request shutdown. Calling wait on a top_block that is + * not running IS NOT an error (wait returns w/o blocking). */ void wait(); /*! * Lock a flowgraph in preparation for reconfiguration. When an equal * number of calls to lock() and unlock() have occurred, the flowgraph - * will be restarted automatically. + * will be reconfigured. * - * N.B. lock() and unlock() cannot be called from a flowgraph thread + * N.B. lock() and unlock() may not be called from a flowgraph thread * (E.g., gr_block::work method) or deadlock will occur when * reconfiguration happens. */ @@ -91,9 +93,9 @@ public: /*! * Unlock a flowgraph in preparation for reconfiguration. When an equal * number of calls to lock() and unlock() have occurred, the flowgraph - * will be restarted automatically. + * will be reconfigured. * - * N.B. lock() and unlock() cannot be called from a flowgraph thread + * N.B. lock() and unlock() may not be called from a flowgraph thread * (E.g., gr_block::work method) or deadlock will occur when * reconfiguration happens. */ |