diff options
Diffstat (limited to 'gruel/src')
-rw-r--r-- | gruel/src/include/gruel/Makefile.am | 3 | ||||
-rw-r--r-- | gruel/src/include/gruel/thread.h | 34 | ||||
-rw-r--r-- | gruel/src/include/gruel/thread_body_wrapper.h | 4 | ||||
-rw-r--r-- | gruel/src/include/gruel/thread_group.h | 4 |
4 files changed, 40 insertions, 5 deletions
diff --git a/gruel/src/include/gruel/Makefile.am b/gruel/src/include/gruel/Makefile.am index d7354b871..622fbc2d3 100644 --- a/gruel/src/include/gruel/Makefile.am +++ b/gruel/src/include/gruel/Makefile.am @@ -34,4 +34,5 @@ gruelinclude_HEADERS = \ realtime.h \ sys_pri.h \ thread_body_wrapper.h \ - thread_group.h + thread_group.h \ + thread.h diff --git a/gruel/src/include/gruel/thread.h b/gruel/src/include/gruel/thread.h new file mode 100644 index 000000000..0e7acaa85 --- /dev/null +++ b/gruel/src/include/gruel/thread.h @@ -0,0 +1,34 @@ +/* -*- c++ -*- */ +/* + * Copyright 2009 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_H +#define INCLUDED_THREAD_H + +#include <boost/thread.hpp> + +namespace gruel { + + typedef boost::mutex mutex; + typedef boost::unique_lock<boost::mutex> scoped_lock; + typedef boost::condition_variable condition_variable; + +} /* namespace gruel */ + +#endif /* INCLUDED_THREAD_H */ diff --git a/gruel/src/include/gruel/thread_body_wrapper.h b/gruel/src/include/gruel/thread_body_wrapper.h index 27dbbf7bb..b024bfdaf 100644 --- a/gruel/src/include/gruel/thread_body_wrapper.h +++ b/gruel/src/include/gruel/thread_body_wrapper.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2008 Free Software Foundation, Inc. + * Copyright 2008,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -21,7 +21,7 @@ #ifndef INCLUDED_THREAD_BODY_WRAPPER_H #define INCLUDED_THREAD_BODY_WRAPPER_H -#include <boost/thread.hpp> +#include <gruel/thread.h> #include <exception> #include <iostream> diff --git a/gruel/src/include/gruel/thread_group.h b/gruel/src/include/gruel/thread_group.h index ae9a4250b..0270746e4 100644 --- a/gruel/src/include/gruel/thread_group.h +++ b/gruel/src/include/gruel/thread_group.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2001-2003 William E. Kempf * Copyright (C) 2007 Anthony Williams - * Copyright 2008 Free Software Foundation, Inc. + * Copyright 2008,2009 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) @@ -15,8 +15,8 @@ #ifndef INCLUDED_GRUEL_THREAD_GROUP_H #define INCLUDED_GRUEL_THREAD_GROUP_H +#include <gruel/thread.h> #include <boost/utility.hpp> -#include <boost/thread.hpp> #include <boost/thread/shared_mutex.hpp> #include <boost/function.hpp> |