24 #ifndef __CORE_THREADING_THREAD_LIST_H_ 25 #define __CORE_THREADING_THREAD_LIST_H_ 27 #include <core/exception.h> 28 #include <core/threading/thread.h> 29 #include <core/threading/thread_initializer.h> 30 #include <core/threading/thread_finalizer.h> 31 #include <core/utils/lock_list.h> 42 class InterruptibleBarrier;
61 ThreadList(
bool maintain_barrier,
const char *tlname =
"");
66 void set_name(
const char *format, ...);
74 void cancel_finalize();
75 void set_prepfin_hold(
bool hold);
79 void wakeup_unlocked();
80 void wakeup_unlocked(
Barrier *barrier);
81 void wakeup_and_wait(
unsigned int timeout_sec = 0,
82 unsigned int timeout_nanosec = 0);
88 void try_recover(std::list<std::string> &recovered_threads);
89 void set_maintain_barrier(
bool maintain_barrier);
93 void push_front(
Thread *thread);
94 void push_front_locked(
Thread *thread);
95 void push_back(
Thread *thread);
96 void push_back_locked(
Thread *thread);
100 ThreadList::iterator erase(iterator pos);
102 void remove(
Thread *thread);
103 void remove_locked(
Thread *thread);
120 void notify_of_failed_init();
121 void update_barrier();
126 Mutex *__finalize_mutex;
129 std::list<std::pair<InterruptibleBarrier *, ThreadList> > __wnw_bad_barriers;
130 std::list<std::pair<InterruptibleBarrier *, ThreadList> >::iterator __wnw_bbit;
ThreadListSealedException(const char *operation)
Constructor.
Fawkes library namespace.
Thread class encapsulation of pthreads.
A barrier is a synchronization tool which blocks until a given number of threads have reached the bar...
Thread list sealed exception.
Base class for exceptions in Fawkes.
Thread initializer interface.
Thread list not sealed exception.
Exception & operator=(const Exception &exc)
Assign an Exception.
Mutex mutual exclusion lock.
A barrier is a synchronization tool which blocks until a given number of threads have reached the bar...
Thread finalizer interface.