watch.h
Go to the documentation of this file.
14 * This allows programmatic control of watchpoints. Requires MADWorld using legacy ThreadPool and macOS. Example:
21 * ::ttg_madness::ttg_default_execution_context().taskq.add([&x](){ x = 1.0; }); // and so will this ...
35 // TODO improve this when shortsighted MADNESS macro names are strengthened, i.e. HAVE_INTEL_TBB ->
58 ttg::print_error(ttg::default_execution_context().rank(), "WARNING: watchpoints are only supported on macOS");
68 for (auto t : threads) ttg::detail::MemoryWatchpoint_x86_64::Pool::instance()->set(addr, size, cond, t);
static void initialize_instance(const std::vector< const pthread_t * > &threads)
Definition: bug.h:89
static std::shared_ptr< Pool > instance()
accesses the unique pool; asserts that the default instance has been initialized by calling initializ...
Definition: bug.h:94
const std::vector< const pthread_t * > & watchpoints_threads()
Definition: watch.h:32
void initialize_watchpoints()
must be called from main thread before setting watchpoints
Definition: watch.h:52
void watchpoint_clear(T *addr)
clears the hardware watchpoint for window [addr,addr+size) previously created with watchpoint_set<T>
Definition: watch.h:73
void watchpoint_set(T *addr, ttg::detail::MemoryWatchpoint_x86_64::Size size, ttg::detail::MemoryWatchpoint_x86_64::Condition cond)
sets a hardware watchpoint for window [addr,addr+size) and condition cond
Definition: watch.h:65
World default_execution_context()
Accesses the default backend's default execution context.
Definition: run.h:68
void print_error(const T &t, const Ts &... ts)
atomically prints to std::cerr a sequence of items (separated by ttg::print_separator) followed by st...
Definition: print.h:138