Skip to content

Commit

Permalink
Fixing #555: adding proper definition of BOOST_FORCEINLINE when using…
Browse files Browse the repository at this point in the history
… older boost version
  • Loading branch information
Thomas Heller committed Oct 1, 2012
1 parent da3127f commit 8b3d51e
Show file tree
Hide file tree
Showing 17 changed files with 41 additions and 5 deletions.
1 change: 1 addition & 0 deletions hpx/config.hpp
Expand Up @@ -11,6 +11,7 @@
#include <hpx/config/compiler_specific.hpp>
#include <hpx/config/branch_hints.hpp>
#include <hpx/config/manual_profiling.hpp>
#include <hpx/config/forceinline.hpp>
#include <hpx/config/preprocessor/add3.hpp>
#include <hpx/config/preprocessor/round_up.hpp>
#include <hpx/config/preprocessor/round_up_add3.hpp>
Expand Down
22 changes: 22 additions & 0 deletions hpx/config/forceinline.hpp
@@ -0,0 +1,22 @@

// Copyright (c) 2012 Thomas Heller
//
// 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)

#ifndef HPX_CONFIG_FORCEINLINE_HPP
#define HPX_CONFIG_FORCEINLINE_HPP

#include <boost/config/suffix.hpp>

#if !defined(BOOST_FORCEINLINE)
# if defined(_MSC_VER)
# define BOOST_FORCEINLINE __forceinline
# elif defined(__GNUC__) && __GNUC__ > 3
# define BOOST_FORCEIINLINE inline __attribute__ ((always_inline))
# else
# define BOOST_FORCEINLINE inline
# endif
#endif

#endif
6 changes: 3 additions & 3 deletions hpx/lcos/detail/future_data.hpp
Expand Up @@ -312,7 +312,7 @@ namespace hpx { namespace lcos { namespace detail
// invoke the callback (continuation) function
set_on_completed_ = false;
on_completed_(f);
on_completed_.reset();
on_completed_.clear();
return;
}
}
Expand Down Expand Up @@ -341,7 +341,7 @@ namespace hpx { namespace lcos { namespace detail
// invoke the callback (continuation) function
set_on_completed_ = false;
on_completed_(f);
on_completed_.reset();
on_completed_.clear();
return;
}
}
Expand Down Expand Up @@ -419,7 +419,7 @@ namespace hpx { namespace lcos { namespace detail
// invoke the callback (continuation) function
on_completed_(f);
set_on_completed_ = false;
on_completed_.reset();
on_completed_.clear();
}
return retval;
}
Expand Down
2 changes: 1 addition & 1 deletion hpx/lcos/local/conditional_trigger.hpp
Expand Up @@ -55,7 +55,7 @@ namespace hpx { namespace lcos { namespace local

void reset()
{
cond_.reset();
cond_.clear();
}

/// \brief Trigger this object.
Expand Down
2 changes: 1 addition & 1 deletion hpx/runtime/actions/component_action.hpp
Expand Up @@ -506,7 +506,7 @@ namespace hpx { namespace actions
/**/

#define HPX_DEFINE_COMPONENT_ACTION_TPL(component, func, name) \
typedef HPX_MAKE_COMPONENT_ACTION_TPL(component, func)::type name \
typedef typename HPX_MAKE_COMPONENT_ACTION_TPL(component, func)::type name\
/**/
#define HPX_DEFINE_COMPONENT_CONST_ACTION_TPL(component, func, name) \
typedef HPX_MAKE_CONST_COMPONENT_ACTION_TPL(component, func)::type name \
Expand Down
1 change: 1 addition & 0 deletions hpx/runtime/actions/component_action_implementations.hpp
Expand Up @@ -9,6 +9,7 @@
#if !defined(HPX_RUNTIME_ACTIONS_ACTION_IMPLEMENTATIONS_MAY_20_2008_1104AM)
#define HPX_RUNTIME_ACTIONS_ACTION_IMPLEMENTATIONS_MAY_20_2008_1104AM

#include <hpx/config/forceinline.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/repeat.hpp>
#include <boost/preprocessor/iterate.hpp>
Expand Down
Expand Up @@ -8,6 +8,7 @@
#if !defined(HPX_RUNTIME_ACTIONS_CONSTRUCT_CONTINUATION_FUNCTION_OBJECTS_MAY_08_2012_0610PM)
#define HPX_RUNTIME_ACTIONS_CONSTRUCT_CONTINUATION_FUNCTION_OBJECTS_MAY_08_2012_0610PM

#include <hpx/config/forceinline.hpp>
#include <hpx/util/move.hpp>
#include <boost/fusion/include/size.hpp>
#include <boost/type_traits/remove_reference.hpp>
Expand Down
1 change: 1 addition & 0 deletions hpx/runtime/actions/construct_continuation_functions.hpp
Expand Up @@ -8,6 +8,7 @@
#if !defined(HPX_RUNTIME_ACTIONS_CONSTRUCT_CONTINUATION_FUNCTION_FEB_22_2012_1143AM)
#define HPX_RUNTIME_ACTIONS_CONSTRUCT_CONTINUATION_FUNCTION_FEB_22_2012_1143AM

#include <hpx/config/forceinline.hpp>
#include <hpx/util/move.hpp>

#include <boost/preprocessor/cat.hpp>
Expand Down
1 change: 1 addition & 0 deletions hpx/runtime/actions/define_function_operators.hpp
Expand Up @@ -8,6 +8,7 @@
#if !defined(HPX_RUNTIME_ACTIONS_FUNCTION_OPERATORS_MAY_09_2012_0420PM)
#define HPX_RUNTIME_ACTIONS_FUNCTION_OPERATORS_MAY_09_2012_0420PM

#include <hpx/config/forceinline.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/iterate.hpp>
#include <boost/preprocessor/enum_params.hpp>
Expand Down
1 change: 1 addition & 0 deletions hpx/runtime/actions/plain_action_implementations.hpp
Expand Up @@ -9,6 +9,7 @@
#if !defined(HPX_RUNTIME_ACTIONS_PLAIN_ACTION_IMPLEMENTATIONS_NOV_14_2008_0811PM)
#define HPX_RUNTIME_ACTIONS_PLAIN_ACTION_IMPLEMENTATIONS_NOV_14_2008_0811PM

#include <hpx/config/forceinline.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/repeat.hpp>
#include <boost/preprocessor/iterate.hpp>
Expand Down
1 change: 1 addition & 0 deletions hpx/util/bind_action.hpp
Expand Up @@ -10,6 +10,7 @@
#define HPX_UTIL_BIND_ACTION_HPP

#include <hpx/hpx_fwd.hpp>
#include <hpx/config.hpp>
#include <hpx/util/move.hpp>
#include <hpx/util/tuple.hpp>
#include <hpx/util/detail/remove_reference.hpp>
Expand Down
1 change: 1 addition & 0 deletions hpx/util/coroutine/detail/context_generic_context.hpp
Expand Up @@ -20,6 +20,7 @@
#include <boost/context/all.hpp>
#include <boost/noncopyable.hpp>

#include <hpx/config/forecinline.hpp>
#include <hpx/util/coroutine/exception.hpp>
#include <hpx/util/coroutine/detail/swap_context.hpp>

Expand Down
1 change: 1 addition & 0 deletions hpx/util/coroutine/detail/context_linux_x86.hpp
Expand Up @@ -23,6 +23,7 @@
#include <boost/assert.hpp>
#include <boost/detail/atomic_count.hpp>

#include <hpx/config/forceinline.hpp>
#include <hpx/util/coroutine/detail/config.hpp>
#include <hpx/util/coroutine/detail/posix_utility.hpp>
#include <hpx/util/coroutine/detail/swap_context.hpp>
Expand Down
1 change: 1 addition & 0 deletions hpx/util/coroutine/detail/context_windows_fibers.hpp
Expand Up @@ -41,6 +41,7 @@
#include <boost/system/error_code.hpp>
#include <boost/cstdint.hpp>
#include <boost/detail/atomic_count.hpp>
#include <hpx/config/forceinline.hpp>
#include <hpx/util/coroutine/detail/config.hpp>
#include <hpx/util/coroutine/exception.hpp>
#include <hpx/util/coroutine/detail/swap_context.hpp>
Expand Down
2 changes: 2 additions & 0 deletions hpx/util/detail/function_template.hpp
Expand Up @@ -9,6 +9,8 @@
#ifndef HPX_UTIL_FUNCTION_TEMPLATE_HPP
#define HPX_UTIL_FUNCTION_TEMPLATE_HPP

#include <hpx/config/forceinline.hpp>

#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
Expand Down
1 change: 1 addition & 0 deletions hpx/util/detail/get_table.hpp
Expand Up @@ -8,6 +8,7 @@
#ifndef HPX_FUNCTION_DETAIL_GET_TABLE_HPP
#define HPX_FUNCTION_DETAIL_GET_TABLE_HPP

#include <hpx/config/forceinline.hpp>
#include <boost/detail/sp_typeinfo.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
Expand Down
1 change: 1 addition & 0 deletions hpx/util/detail/vtable.hpp
Expand Up @@ -8,6 +8,7 @@
#ifndef HPX_FUNCTION_DETAIL_VTABLE_HPP
#define HPX_FUNCTION_DETAIL_VTABLE_HPP

#include <hpx/config/forceinline.hpp>
#include <boost/ref.hpp>
#include <boost/detail/sp_typeinfo.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
Expand Down

0 comments on commit 8b3d51e

Please sign in to comment.