Skip to content

Commit

Permalink
Merge pull request #4139 from msimberg/coroutines-includes
Browse files Browse the repository at this point in the history
Remove runtime includes from coroutines module
  • Loading branch information
msimberg committed Oct 18, 2019
2 parents b59edd5 + dcb549a commit 5bfbe83
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
1 change: 0 additions & 1 deletion libs/coroutines/src/detail/coroutine_impl.cpp
Expand Up @@ -34,7 +34,6 @@
#include <hpx/coroutines/coroutine.hpp>
#include <hpx/coroutines/detail/coroutine_impl.hpp>
#include <hpx/coroutines/detail/coroutine_self.hpp>
#include <hpx/runtime/threads/thread_data_fwd.hpp>

#include <cstddef>
#include <exception>
Expand Down
12 changes: 5 additions & 7 deletions libs/coroutines/src/detail/tss.cpp
Expand Up @@ -16,8 +16,6 @@
#include <hpx/coroutines/detail/tss.hpp>
#include <hpx/errors.hpp>

#include <hpx/runtime/threads_fwd.hpp>

#include <cstddef>
#include <map>
#include <memory>
Expand Down Expand Up @@ -60,7 +58,7 @@ namespace hpx { namespace threads { namespace coroutines { namespace detail {
std::size_t get_tss_thread_data(tss_storage* storage)
{
#ifdef HPX_HAVE_THREAD_LOCAL_STORAGE
hpx::threads::thread_self* self = hpx::threads::get_self_ptr();
coroutine_self* self = coroutine_self::get_self();
if (nullptr == self)
{
HPX_THROW_EXCEPTION(null_thread_id,
Expand Down Expand Up @@ -89,7 +87,7 @@ namespace hpx { namespace threads { namespace coroutines { namespace detail {
std::size_t set_tss_thread_data(tss_storage* storage, std::size_t data)
{
#ifdef HPX_HAVE_THREAD_LOCAL_STORAGE
hpx::threads::thread_self* self = hpx::threads::get_self_ptr();
coroutine_self* self = coroutine_self::get_self();
if (nullptr == self)
{
HPX_THROW_EXCEPTION(null_thread_id,
Expand Down Expand Up @@ -128,7 +126,7 @@ namespace hpx { namespace threads { namespace coroutines { namespace detail {
tss_data_node* find_tss_data(void const* key)
{
#ifdef HPX_HAVE_THREAD_LOCAL_STORAGE
hpx::threads::thread_self* self = hpx::threads::get_self_ptr();
coroutine_self* self = coroutine_self::get_self();
if (nullptr == self)
{
HPX_THROW_EXCEPTION(null_thread_id,
Expand Down Expand Up @@ -163,7 +161,7 @@ namespace hpx { namespace threads { namespace coroutines { namespace detail {
std::shared_ptr<tss_cleanup_function> const& func, void* tss_data)
{
#ifdef HPX_HAVE_THREAD_LOCAL_STORAGE
hpx::threads::thread_self* self = hpx::threads::get_self_ptr();
coroutine_self* self = coroutine_self::get_self();
if (nullptr == self)
{
HPX_THROW_EXCEPTION(null_thread_id,
Expand All @@ -186,7 +184,7 @@ namespace hpx { namespace threads { namespace coroutines { namespace detail {
void erase_tss_node(void const* key, bool cleanup_existing)
{
#ifdef HPX_HAVE_THREAD_LOCAL_STORAGE
hpx::threads::thread_self* self = hpx::threads::get_self_ptr();
coroutine_self* self = coroutine_self::get_self();
if (nullptr == self)
{
HPX_THROW_EXCEPTION(null_thread_id,
Expand Down

0 comments on commit 5bfbe83

Please sign in to comment.