MCPcopy Create free account
hub / github.com/TheHPXProject/hpx / new_task

Function new_task

libs/core/threading_base/src/external_timer.cpp:30–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 namespace external_timer {
29
30 std::shared_ptr<task_wrapper> new_task(
31 threads::thread_description const& description,
32 std::uint32_t /* parent_locality_id */,
33 threads::thread_id_type parent_task)
34 {
35 std::shared_ptr<task_wrapper> parent_wrapper;
36
37 // Parent pointers aren't reliable in distributed runs.
38 if (parent_task != nullptr && enable_parent_task_handler &&
39 enable_parent_task_handler())
40 {
41 parent_wrapper =
42 get_thread_id_data(parent_task)->get_timer_data();
43 }
44
45 if (description.kind() ==
46 threads::thread_description::data_type::description)
47 {
48 return new_task(
49 description.get_description(), UINTMAX_MAX, parent_wrapper);
50 }
51 else
52 {
53 HPX_ASSERT(description.kind() ==
54 threads::thread_description::data_type::address);
55 return new_task(
56 description.get_address(), UINTMAX_MAX, parent_wrapper);
57 }
58 }
59
60 // register the function pointers
61 void register_external_timer(registration& reg)

Callers 4

schedule_threadMethod · 0.50
schedule_threadMethod · 0.50
post_l_pFunction · 0.50
post_l_p_valFunction · 0.50

Calls 6

get_thread_id_dataFunction · 0.85
get_timer_dataMethod · 0.80
kindMethod · 0.45
get_descriptionMethod · 0.45
get_addressMethod · 0.45

Tested by

no test coverage detected