| 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) |
no test coverage detected