36#ifndef THREAD_CANCELLATION_HPP
37#define THREAD_CANCELLATION_HPP
39#include "../my_config.h"
119 static void cancel(pthread_t tid,
bool x_immediate, U_64 x_flag);
125 static bool cancel_status(pthread_t tid);
131 static bool clear_pending_request(pthread_t tid);
141 static void associate_tid_to_tid(pthread_t src, pthread_t dst);
147 static void remove_association_for_tid(pthread_t src);
152 static void remove_association_targeted_at(pthread_t dst);
155 static void dead_thread(pthread_t tid);
189 static pthread_mutex_t access;
190 static std::list<thread_cancellation *> info;
191 static std::list<fields> preborn;
192 static std::multimap<pthread_t, pthread_t> thread_asso;
195 static void set_cancellation_in_info_for(pthread_t tid,
203 static void add_to_preborn(pthread_t tid,
bool x_immediate, U_64 x_flag);
204 static void remove_from_preborn(pthread_t tid,
bool & found,
bool & prev);
205 static void find_asso_tid_with(pthread_t tid,
206 std::multimap<pthread_t, pthread_t>::iterator & begin,
207 std::multimap<pthread_t, pthread_t>::iterator & end);
210 static bool flag_exception_thrown(pthread_t tid,
bool & found);
class to be used as parent to provide checkpoints to inherited classes
static U_I count()
method for debugging/control purposes
thread_cancellation(thread_cancellation &&ref) noexcept=default
move constructor
virtual ~thread_cancellation() noexcept(false)
the destructor
thread_cancellation(const thread_cancellation &ref)=default
copy constructor
void block_delayed_cancellation(bool mode)
thread_cancellation & operator=(const thread_cancellation &ref)=default
assignment operator
thread_cancellation()
the constructor
void check_self_cancellation() const
Checkpoint test : whether the current libdar call must abort or not.
bool self_is_under_cancellation() const
get the current thread status
contains all the excetion class thrown by libdar
are defined here basic integer types that tend to be portable
libdar namespace encapsulate all libdar symbols