Skip to content

Commit c42a6af

Browse files
committed
Patching recently introduced issues on Windows/MSVC
Signed-off-by: Hartmut Kaiser <hartmut.kaiser@gmail.com>
1 parent f264dc8 commit c42a6af

5 files changed

Lines changed: 21 additions & 18 deletions

File tree

libs/core/coroutines/include/hpx/coroutines/thread_id_type.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ namespace hpx::threads {
2424

2525
///////////////////////////////////////////////////////////////////////////
2626
// same as below, just not holding a reference count
27-
HPX_CXX_CORE_EXPORT struct thread_id
27+
HPX_CXX_CORE_EXPORT struct HPX_CORE_EXPORT thread_id
2828
{
2929
private:
3030
using thread_id_repr = void*;
3131

3232
public:
3333
constexpr thread_id() noexcept = default;
3434

35-
thread_id(thread_id const&) = default;
36-
thread_id& operator=(thread_id const&) = default;
35+
thread_id(thread_id const&) noexcept = default;
36+
thread_id& operator=(thread_id const&) noexcept = default;
3737

3838
~thread_id() = default;
3939

@@ -52,11 +52,11 @@ namespace hpx::threads {
5252
return *this;
5353
}
5454

55-
explicit constexpr thread_id(thread_id_repr thrd) noexcept
55+
explicit constexpr thread_id(thread_id_repr const thrd) noexcept
5656
: thrd_(thrd)
5757
{
5858
}
59-
constexpr thread_id& operator=(thread_id_repr rhs) noexcept
59+
constexpr thread_id& operator=(thread_id_repr const rhs) noexcept
6060
{
6161
thrd_ = rhs;
6262
return *this;
@@ -164,7 +164,7 @@ namespace hpx::threads {
164164
// created thread will be held alive by the variable returned from
165165
// the creation function;
166166
explicit constexpr thread_data_reference_counting(
167-
thread_id_addref addref = thread_id_addref::yes) noexcept
167+
thread_id_addref const addref = thread_id_addref::yes) noexcept
168168
: count_(addref == thread_id_addref::yes ? 1 : 0)
169169
{
170170
}
@@ -232,7 +232,7 @@ namespace hpx::threads {
232232
using thread_repr = detail::thread_data_reference_counting;
233233

234234
explicit thread_id_ref(thread_repr* thrd,
235-
thread_id_addref addref = thread_id_addref::yes) noexcept
235+
thread_id_addref const addref = thread_id_addref::yes) noexcept
236236
: thrd_(thrd, addref == thread_id_addref::yes)
237237
{
238238
}
@@ -296,7 +296,7 @@ namespace hpx::threads {
296296
thrd_.reset();
297297
}
298298

299-
void reset(thread_repr* thrd, bool add_ref = true) noexcept
299+
void reset(thread_repr* thrd, bool const add_ref = true) noexcept
300300
{
301301
thrd_.reset(thrd, add_ref);
302302
}

libs/core/itt_notify/include/hpx/itt_notify/api.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ HPX_CXX_CORE_EXPORT HPX_CORE_EXPORT void itt_metadata_add(
136136
///////////////////////////////////////////////////////////////////////////////
137137
namespace hpx::threads {
138138

139-
struct thread_description;
139+
HPX_CXX_CORE_EXPORT struct HPX_CORE_EXPORT thread_description;
140140
} // namespace hpx::threads
141141

142142
namespace hpx::util::itt {
@@ -692,7 +692,7 @@ HPX_CXX_CORE_EXPORT constexpr void itt_metadata_add(
692692
//////////////////////////////////////////////////////////////////////////////
693693
namespace hpx::threads {
694694

695-
struct thread_description;
695+
HPX_CXX_CORE_EXPORT struct HPX_CORE_EXPORT thread_description;
696696
} // namespace hpx::threads
697697

698698
namespace hpx::util::itt {

libs/core/threading_base/include/hpx/threading_base/thread_description.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ namespace hpx::threads {
225225

226226
private:
227227
// expose for ABI compatibility reasons
228-
HPX_CORE_EXPORT void init_from_alternative_name(char const* altname);
228+
void init_from_alternative_name(char const* altname);
229229

230230
public:
231231
thread_description() noexcept = default;

libs/core/threading_base/include/hpx/threading_base/threading_base_fwd.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,19 @@ namespace hpx::tracing {
2424

2525
namespace hpx::threads {
2626

27-
HPX_CXX_CORE_EXPORT class HPX_CORE_EXPORT
28-
thread_data; // forward declaration only
27+
// forward declaration only
28+
HPX_CXX_CORE_EXPORT class HPX_CORE_EXPORT thread_data;
2929
HPX_CXX_CORE_EXPORT class thread_data_stackful;
3030
HPX_CXX_CORE_EXPORT class thread_data_stackless;
3131

3232
HPX_CXX_CORE_EXPORT class thread_init_data;
33-
HPX_CXX_CORE_EXPORT struct thread_description;
33+
HPX_CXX_CORE_EXPORT struct HPX_CORE_EXPORT thread_description;
3434

3535
namespace policies {
3636

3737
HPX_CXX_CORE_EXPORT struct HPX_CORE_EXPORT scheduler_base;
38-
}
38+
} // namespace policies
39+
3940
HPX_CXX_CORE_EXPORT class HPX_CORE_EXPORT thread_pool_base;
4041

4142
/// \cond NOINTERNAL

libs/core/tracing/include/hpx/tracing/tracing.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,14 @@
4242
#endif
4343

4444
namespace hpx::threads {
45-
HPX_CORE_EXPORT struct thread_description;
46-
HPX_CORE_EXPORT struct thread_id;
45+
46+
struct HPX_CORE_EXPORT thread_description;
47+
struct HPX_CORE_EXPORT thread_id;
4748
} // namespace hpx::threads
4849

4950
namespace hpx::util::external_timer {
50-
HPX_CORE_EXPORT struct task_wrapper;
51+
52+
struct HPX_CORE_EXPORT task_wrapper;
5153
} // namespace hpx::util::external_timer
5254

5355
#if defined(HPX_HAVE_TRACY)

0 commit comments

Comments
 (0)