diff options
author | eb <eb@221aa14e-8319-0410-a670-987f0aec2ac5> | 2007-05-02 04:08:47 +0000 |
---|---|---|
committer | eb <eb@221aa14e-8319-0410-a670-987f0aec2ac5> | 2007-05-02 04:08:47 +0000 |
commit | 0bf2128a621ae84099f43744e1b81800f2b9d2d7 (patch) | |
tree | 1345b44ae9060e99ff236f983dd272c6d35a012e /omnithread | |
parent | 28259329a829f157fd877a1c14139eaf0117dabd (diff) |
Merged features/inband -r4812:5218 into trunk. This group of changes
includes:
* working stand-alone mblock code
* work-in-progress on usrp inband signaling
usrp now depends on mblock, and guile is a dependency.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@5221 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'omnithread')
-rw-r--r-- | omnithread/omnithread.h | 4 | ||||
-rw-r--r-- | omnithread/posix.cc | 12 |
2 files changed, 15 insertions, 1 deletions
diff --git a/omnithread/omnithread.h b/omnithread/omnithread.h index bd916561e1..26e42b0e1a 100644 --- a/omnithread/omnithread.h +++ b/omnithread/omnithread.h @@ -391,11 +391,15 @@ protected: // execute the run() or run_undetached() member functions depending on // whether start() or start_undetached() is called respectively. +public: + void start_undetached(void); // can be used with the above constructor in a derived class to cause // the thread to be undetached. In this case the thread executes the // run_undetached member function. +protected: + virtual ~omni_thread(void); // destructor cannot be called by user (except via a derived class). // Use exit() or cancel() instead. This also means a thread object must diff --git a/omnithread/posix.cc b/omnithread/posix.cc index b82e86df3f..7325166c6c 100644 --- a/omnithread/posix.cc +++ b/omnithread/posix.cc @@ -51,6 +51,10 @@ #include <time.h> #include <omnithread.h> +#if (PthreadDraftVersion == 0) +#error "PthreadDraftVersion not defined. If not sure, define it to 10" +#endif + #ifdef HAVE_NANOSLEEP #undef NoNanoSleep #else @@ -73,8 +77,14 @@ #endif #endif +#if 1 #define DB(x) // x -//#include <iostream.h> or #include <iostream> if DB is on. +#else +#define DB(x) x +#include <iostream> +using std::cerr; +using std::endl; +#endif #if (PthreadDraftVersion <= 6) #define ERRNO(x) (((x) != 0) ? (errno) : 0) |