diff --git a/LCS/Common/include/Common/lofar_thread.h b/LCS/Common/include/Common/lofar_thread.h new file mode 100644 index 0000000000000000000000000000000000000000..febc524e3ac6bdb2de842fdda178ca23784c14df --- /dev/null +++ b/LCS/Common/include/Common/lofar_thread.h @@ -0,0 +1,46 @@ +//# lofar_thread.h: basic header for the Thread package +//# +//# Copyright (C) 2002 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# 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, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id$ + +#ifndef LOFAR_COMMON_THREAD_H +#define LOFAR_COMMON_THREAD_H + +// \file lofar_thread.h + +#include <boost/thread.hpp> +#include <Common/CheckConfig.h> + +namespace LOFAR +{ + using namespace boost::thread; +} + + +// You should invoke CHECK_CONFIG_THREADS(id) in every header file +// that defines a data structure that depends on USE_THREADs. +#ifdef USE_THREADS + #define CHECK_CONFIG_THREADS(id) CHECK_CONFIG(id,UseThreads,yes); +#else + #define CHECK_CONFIG_THREADS(id) CHECK_CONFIG(id,UseThreads,no); +#endif + +#endif + diff --git a/LCS/Common/src/Makefile.am b/LCS/Common/src/Makefile.am index 25dbb35c5e3359dbe1aad800c876837df06bff7b..35a4f634a8c8760d3b66d288d3708b5ba4973eae 100644 --- a/LCS/Common/src/Makefile.am +++ b/LCS/Common/src/Makefile.am @@ -43,6 +43,7 @@ INSTHDRS = \ KeyValueMap.h \ lofar_algorithm.h \ lofar_complex.h \ + lofar_datetime.h \ lofar_deque.h \ lofar_fstream.h \ lofar_global_symbol_warning.h \ @@ -59,6 +60,7 @@ INSTHDRS = \ lofar_stack.h \ lofar_string.h \ lofar_strstream.h \ + lofar_thread.h \ LofarTypedefs.h \ LofarTypes.h \ lofar_vector.h \ diff --git a/LCS/Common/src/lofar_thread.h b/LCS/Common/src/lofar_thread.h new file mode 100644 index 0000000000000000000000000000000000000000..febc524e3ac6bdb2de842fdda178ca23784c14df --- /dev/null +++ b/LCS/Common/src/lofar_thread.h @@ -0,0 +1,46 @@ +//# lofar_thread.h: basic header for the Thread package +//# +//# Copyright (C) 2002 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# 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, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id$ + +#ifndef LOFAR_COMMON_THREAD_H +#define LOFAR_COMMON_THREAD_H + +// \file lofar_thread.h + +#include <boost/thread.hpp> +#include <Common/CheckConfig.h> + +namespace LOFAR +{ + using namespace boost::thread; +} + + +// You should invoke CHECK_CONFIG_THREADS(id) in every header file +// that defines a data structure that depends on USE_THREADs. +#ifdef USE_THREADS + #define CHECK_CONFIG_THREADS(id) CHECK_CONFIG(id,UseThreads,yes); +#else + #define CHECK_CONFIG_THREADS(id) CHECK_CONFIG(id,UseThreads,no); +#endif + +#endif +