summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/thread.h')
-rw-r--r--winsup/cygwin/thread.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h
index 579bb184e..2cf917450 100644
--- a/winsup/cygwin/thread.h
+++ b/winsup/cygwin/thread.h
@@ -456,7 +456,7 @@ public:
void *(*function) (void *);
void *arg;
void *return_ptr;
- bool running;
+ bool valid;
bool suspended;
int cancelstate, canceltype;
HANDLE cancel_event;
@@ -521,12 +521,25 @@ public:
threads.for_each (&pthread::_fixup_after_fork);
}
+ static void suspend_all_except_self ()
+ {
+ threads.for_each (&pthread::suspend_except_self);
+ }
+
+ static void resume_all ()
+ {
+ threads.for_each (&pthread::resume);
+ }
+
private:
static List<pthread> threads;
DWORD thread_id;
__pthread_cleanup_handler *cleanup_stack;
pthread_mutex mutex;
+ void suspend_except_self ();
+ void resume ();
+
void _fixup_after_fork ();
void pop_all_cleanup_handlers (void);